Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8290101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:41:56+00:00 2026-06-08T12:41:56+00:00

Scala (at least on the JVM ) uses type erasure for Java compatibility. This

  • 0

Scala (at least on the JVM) uses type erasure for Java compatibility. This feature is widely held to suck. Fixing this would be difficult on the JVM.

In contrast to the JVM situation, .NET supports reified generics. Does Scala’s .NET implementation use them? If not, could it, or else what issues would using reification cause?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T12:41:58+00:00Added an answer on June 8, 2026 at 12:41 pm

    It’s work in progress, carefully not to break Scala semantics between JVM and .NET.

    I asked this question back in 2011 on the scala-tools mailinglist and the answer is given by Miguel Garcia in which he outlines the big picture:

    Some quotes:

    (1) What the Scala.Net preview currently does. As you have noticed,
    the erasure phase also runs as part of the pipeline. This is a
    “feature” of the preview version, a “feature” that had to be included
    because support for CLR Generics wasn’t there yet (more on this
    below). There is however one big advantage to running JVM-style
    erasure in Scala.Net: all the Scala programs out there that rely on
    the Scala library can already be compiled on .Net, instead of waiting
    for CLR Generics to be ready. Those programs that rely on the Java JDK
    can also be compiled, subject to IKVM support of the JDK APIs in
    question [1].

    (2) Support for CLR Generics in Scala.Net. The main motivation to
    support it is gaining interoperability with existing assemblies. In
    gaining that interoperability, care will be taken not to break away
    from Scala semantics. In other words, any valid Scala program is going
    to run and produce the same results on JVM and .NET. Which brings us
    to the work in progress [2]. The initial prototype handles only the C#
    subset of Scala. So now I’m addressing the rest. It’s more work than
    initially anticipated but it’s important to cover the whole language.

    A few more comments regarding interop with .NET assemblies, in
    particular native issues. Yes, CLR assemblies can express using
    “native int” (different sizes on different CPUs), P/Invoke of
    C-functions exported by a .dll and such. Scala.Net does not aim to do
    that low-level trickery. The assembly interoperability of interest is
    at the level of “Common Language Specification”, i.e. what one
    normally obtains from any C#, VB.NET, etc. compiler (“normally” i.e.
    unless using “[DllImport]” attributes and related C++-isms).

    Quoting from the CLI spec:

    — start quote — The Common Language Specification (CLS) — The CLS is an agreement between language designers and framework (that is,
    class library) designers. It specifies a subset of the CTS (Common
    Type System) and a set of usage conventions.
    Languages provide their users the greatest ability to access
    frameworks by implementing at least those parts of the CTS that are
    part of the CLS. Similarly, frameworks will be most widely used if
    their publicly exported aspects (e.g., classes, interfaces, methods,
    and fields) use only types that are part of the CLS and that adhere to
    the CLS conventions.
    — end quote —

    see for the whole thread:

    https://groups.google.com/forum/?fromgroups#!topic/scala-tools/JDjstK1_uvM

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This might be the least important Scala question ever, but it's bothering me. How
Scala programmer should have known that this sort of writing : class Person{ var
I'm trying to implement in Scala a generic data type parameterized on a type
I would like to know what the best Scala imitation of Groovy's safe-dereference operator
What techniques can I use in Scala to deal with long type parameter lists?
Starting with one Java base-interface, I want others to be able to extend this
I understand that C++ is generally considered better than Java for games (at least
Given the strong type system of Scala, I had an ambitious project which I'm
I have some Scala code roughly analogous to this: object Foo { val thingA
Why does this compile: scala> def last[A](a : List[A] ) : A = |

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.