Do everything in Java…

Paulo Pinto via Digitalmars-d digitalmars-d at puremagic.com
Sun Dec 7 10:42:52 PST 2014


On Sunday, 7 December 2014 at 13:39:38 UTC, Dicebot wrote:
> On Saturday, 6 December 2014 at 09:07:34 UTC, Dmitry Olshansky 
> wrote:
>> Solved in Scala:
>> - operator overloading
>> - properties - that + optional (), a library writer still can 
>> enforce () to be used
>> - only and exactly one class - any number in any combination
>> - everything class - sort of, it has 'object' clause (just 
>> like 'class') that can be thought as a kind of namespace or a 
>> singleton if you love OOP.
>>
>> Not fixed:
>> - unsigend types - nothing here unless Java adds support
>> - pasing by value - there are immutable and value types (e.g. 
>> Tuples) but I think they are references behind the scenes
>> - no templates, but you may use AST macros which is even more 
>> powerful
>
> Scala tries to make things nicer by providing higher level 
> abstractions but with tiny bit more poking JVM origins still 
> are unpleasantly notable. The whole Function1 .. Function22 
> trait thing has made me laugh very hard when reading the spec 
> originally :)

.NET is no different

http://msdn.microsoft.com/en-us/library/dd402872%28v=vs.110%29.aspx

This is what happens when generics don't support variable number 
of types.

--
Paulo


More information about the Digitalmars-d mailing list