Ask Your Question
1

Which features of Rascal do you hate?

asked Nov 08 '11

PaulKlint gravatar image PaulKlint flag of Netherlands
373 5 16 33
http://www.cwi.nl/~paulk

updated Nov 08 '11

Are there features of Rascal that you really hate? We would really like to hear about them so that we can try to improve them!

Thank you for helping us to make Rascal a great language.

delete close flag offensive retag edit

4 Answers

Sort by » oldest newest most voted
2

answered Nov 09 '11

Vadim Zaytsev gravatar image Vadim Zaytsev
63 1 8
  1. The longest match hack, i.e. [a-z]+ !>> [a-z] which starts to look kinda scary when [a-z] itself is a sophisticated line long twist.

  2. Having to define the ADT and the grammar separately and the inability to transform one to another.

  3. Typing-related errors when you have to unfold your awesome looking one-liner into a blob of code with insensible variable names just because there was this one point where the type inferred did not match the type you intended, and you could not cast there.

PS: I am deliberately posting those hated things that can and will eventually be improved ;)

link delete flag offensive edit

Comments

This is exactly why I asked for them: future improvement!

PaulKlint (Nov 09 '11)edit
1

answered Nov 09 '11

Vadim Zaytsev gravatar image Vadim Zaytsev
63 1 8

Oh yes, the inability to “undefine” variables.

In order to check if some piece of code works, you type in something like “x = …;”, and starting from that moment, all your list comprehensions that feature “[… | x <- …]” are broken, and you will never be able to figure out the reason why.

I know one is supposed to use only comprehensible names for variables, but real world programmers tend to easily forget about that rule when prototyping… and Rascal is the language for prototyping. Or at least, it should be.

link delete flag offensive edit
1

answered Nov 08 '11

Radu Mereuta gravatar image Radu Mereuta
96 6
  1. One of the things that I don't like, is the error message: "Implementation Error... somewhere in $shell$". I know this is only an alpha version, but when I get something like this, all I can do, is to play around and maybe I get lucky and fix something that Rascal didn't like.

  2. I'm not really a big fan of concrete syntax matching. I've been playing with SDF and Stratego for a while, and I find their concept of matching on AST's much more simple because after the implosion from ParseTree to AST you loose a lot of unwanted information. I know that there is the ADT in Rascal, but I don't see why I have to declare the syntax and the corresponding data types, and after I found all the bugs in my grammar, now I have to find all the bugs in my data types, and then modify both because implode is not general enough.

  3. Slow(er) than SDF, but this already improved already from the previous version, and I hope it will still improve :).

link delete flag offensive edit

Comments

There is still much to do in the syntax definition feature! thanks for the feedback.

JurgenVinju (Nov 09 '11)edit
1

Please post or email any stack trace with an ImplementationError, if you have the time of course. Cheers!

JurgenVinju (Nov 09 '11)edit

I'm not sure exactly where to look, but here is what I see in the console: internal exception: org.rascalmpl.interpreter.asserts.ImplementationError: |project://RascalKSyntax/src/Process.rsc|(1027,280,<46,3>,<57,4>):After this, all ambiguous ast's have been filtered in Process somewhere in: $shell$

Radu Mereuta (Nov 09 '11)edit

I get it when I write something like this: case rule &lt;Hidden+ hid&gt; : ... Please tell me if you need a simple example, or if you need any other information. (PS, edit this post to get the correct form, it seems that I can't write some characters)

Radu Mereuta (Nov 09 '11)edit

Ill have a look next week.. It could happen if you use a non-terminal that does not exist!

JurgenVinju (Nov 10 '11)edit
0

answered Jan 26

Hossein gravatar image Hossein
81 8 20

updated Jan 26

One of the things I personally found disgusting about Rascal is about when two modules M1 and M2 introduce the same name N. In such a case, at the usage-point, if you do not qualify N with either M1 or M2, Rascal won't tell you that it's confused and can't choose between M1::N and M2::N. Instead, it only silently makes its independent choice!

Imagine that Rascal chose M1::N and what you meant was M2::N. Whilst you do observe your program's malfunction in the runtime, you're left with no information whatsoever of where things went wrong! You might be lucky to narrow down the size to finally capture the unqualified instance of N usage. Or, you might keep getting a sporadic runtime behaviour, especially if the two instances have no interface difference so that at usage point you at least get a Rascal exception reporting its failure to perform your desired operation. This silently caters such a notorious genre of bugs that the compiler should have prevented so easily in the first place.

link delete flag offensive edit

Comments

1

Although you have a point about name resolution (and we are working on this by the way) I would prefer avoiding agressive terms like "disgusting" (and others I saw in some of your contributions). Let's focus on constructive proposals and try to jointly create something useful and beautiful.

PaulKlint (Jan 26)edit

I see I have apparently lost the right balance here. I was only using these terms in a friendly chat, and, e.g., in continuation to the title of this thread which contains the term "hate". Anyhow, I do apologise if my words hurt; I certainly didn't mean it. Just wanted to help...

Hossein (Jan 26)edit

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
[hide preview]
Also see the Rascal Tutor.

Question tools

Follow

subscribe to rss feed

Stats

Asked: Nov 08 '11

Seen: 107 times

Last updated: Jan 26