Java-Gaming.org Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (801)
Games in Android Showcase (237)
games submitted by our members
Games in WIP (867)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Scala gods make me laugh.  (Read 3243 times)
0 Members and 1 Guest are viewing this topic.
Offline i30817

Junior Devvie





« Posted 2010-10-09 21:34:56 »

Scala is not complex! Honest.

 Wink

http://adriaanm.github.com/research/2010/10/06/new-in-scala-2.8-type-constructor-inference.html

(something simple and useful "explained" in the worst way possible, with terrible cryptic type variable names).

The Haskell spirit has arrived!
And it is in the Scala std lib.

Can you imagine a newbie trying to look into scala std lib to figure out how to code a map  Grin.

Note that i'm not trying to attack the language, or it's self image. I'm just saying why i think it will NEVER replace java for organizations coding. They went so far down type theory / number of character compression that even "simple" library concepts (and who didn't do a library here) gets crazy.
Offline i30817

Junior Devvie





« Reply #1 - Posted 2010-10-09 21:37:11 »

Maybe this specific article is not the best example. One of the articles at the bottom of his explanation is probably better, but they are of advanced topics anyway so would be complex or impossible anyway.

But i definitely laugh about it, no mistake.
Offline i30817

Junior Devvie





« Reply #2 - Posted 2010-10-09 21:41:28 »

But i'm actually sad inside. A language with great concepts(mostly), updated std lib, topnotch collections - all hampered by a incredible need to write the least code possible.

Names are not noise.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Nate

« JGO Bitwise Duke »


Medals: 167
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #3 - Posted 2010-10-09 22:59:39 »

Quote
Scala uses local type inference to explicitly type parameters by type variables and track the subtyping constraints to determine type arguments that were not specified. For each expression that requires type arguments, the compiler types the unknown type parameters with type variables and collects the constraints that are required for the expression to type check, tracking the subtyping constraints that are required for this expression to type check.

Seems pretty clear to me! XD

Offline i30817

Junior Devvie





« Reply #4 - Posted 2010-10-09 23:02:54 »

The example it's clear if you disregard the short names. A generic type for types that take types. allowing one to make typesafe interfaces/abstract methods for methods that have different type signatures.

I don't doubt that brain twisting applications are possible however.

BTW that quote didn't parse for me. Seemed awfully circular. Maybe you're being sarcastic, or i'm just that stupid.
Offline i30817

Junior Devvie





« Reply #5 - Posted 2010-10-09 23:05:04 »

I wonder why did the scala designers bother with pattern matching. They obviously can do it in their brain just fine.
Offline i30817

Junior Devvie





« Reply #6 - Posted 2010-10-09 23:21:11 »

Let's see if i'm reading that right:
1  
2  
3  
4  
class Traversable[CC[x], T] {
  def filter(p: T => Boolean): CC[T]
  def retain(p: T => Boolean): CC[T] = filter(!p(_))
}

The list example is simple, but what about types that take more than one type argument, like map for instance. Am i right in thinking that this specialization makes
1  
 T == [Key, Value] 

and
1  
CC[x] == Map[[Key, Value]]

Shouldn't it be
1  
CC[x] == Map[Key, Value] 
?
How do they handle different numbers of type arguments?
Offline i30817

Junior Devvie





« Reply #7 - Posted 2010-10-10 00:30:42 »

A different perspective that i hope is the case from the scala mailing list:

Quote
Huh, my problem with the type system is that it _isn't academic enough_.

I refuse to believe that there are not elegant theoretically sound mappings from a robust theory of types to those capabilities that people most frequently want (e.g. such as are found in the collections library), but instead we have a "pragmatic" application of mostly-well-established type theory to the problem only to the point where a solution exists, not to the point of elegance.

(The reason I think elegance is attainable is that there already exist constructs such as "MyType" that would help a good deal with a subset of the problems; that I can describe what needs to happen fairly succinctly and clearly with many of the rest even if it takes a cartload of mixins and higher-order types to express that intent to the type system; and that in a number of cases, Scala has already moved from an inelegant to a more elegant form of expressing certain things, such as A : Manifest.)

If the type system were constructed in such a way that when you wrote programs you would generate proofs of type-theorems about your problem instead of solving your problem, then I would consider it too academic.

  --Rex
Offline VeaR

Junior Devvie


Medals: 3



« Reply #8 - Posted 2010-10-10 19:00:40 »

"academic "

Someone wrote (don't remember where), that Scala is a typical "academic" programming language. As far as that goes, it has already failed as a broadly accepted language. A programmer (his boss, his client) wants the problem solved, only an academic finds pleasure in using a  language so syntactically complex.
Offline nonnus29

Senior Devvie




Giving Java a second chance after ludumdare fiasco


« Reply #9 - Posted 2010-10-17 01:38:53 »

I had a lot of hope for Scala, I really liked sml (and ocaml not as much) but Scala really is a complex language.  People like my certified Architecture Astronaut at my job have no clue about functional programming, let alone pattern matching or higher order functions.  I do not think Scala will ever see wide spread adoption.  In fact, I would've liked to have used it in personal projects, but it's just too painful.  Could you imagine writing a Swing app in Scala?  Cringe.
Pages: [1]
  ignore  |  Print  
 
 

 
Riven (352 views)
2019-09-04 15:33:17

hadezbladez (5190 views)
2018-11-16 13:46:03

hadezbladez (2075 views)
2018-11-16 13:41:33

hadezbladez (5412 views)
2018-11-16 13:35:35

hadezbladez (1127 views)
2018-11-16 13:32:03

EgonOlsen (4549 views)
2018-06-10 19:43:48

EgonOlsen (5412 views)
2018-06-10 19:43:44

EgonOlsen (3089 views)
2018-06-10 19:43:20

DesertCoockie (3985 views)
2018-05-13 18:23:11

nelsongames (4589 views)
2018-04-24 18:15:36
A NON-ideal modular configuration for Eclipse with JavaFX
by philfrei
2019-12-19 19:35:12

Java Gaming Resources
by philfrei
2019-05-14 16:15:13

Deployment and Packaging
by philfrei
2019-05-08 15:15:36

Deployment and Packaging
by philfrei
2019-05-08 15:13:34

Deployment and Packaging
by philfrei
2019-02-17 20:25:53

Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!