Welcome Guest Search | Active Topics | Log In | Register

2 Pages<12
RFC: Making "<-" operator optional
#21 Posted : Friday, April 8, 2016 1:39:47 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/3/2016(UTC)
Posts: 4
Location: Massachusetts, US

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
Thank you for the comment from the language designer himself.

I still can't bring myself to like the '<-' operator. Suppose a newbie somehow "learned" that <- operator always works. He may write like this:

a <- 1
a <- 2
a <- 3

which ruins the whole point of the operator.
On the other hand, if he had to write like

new a = 1
new a = 2
new a = 3

it would feel strange because it looks like "new"ing the same thing over and over again.

But like I said, it's too late to suggest something that changes so fundamental aspect of the language. I won't claim that the "new" operator is the best solution either, since "delete" is hardly used. As for JavaScript, assigning "undefined" to a slot has the same effect as "delete", but it's not intuitive either.
But it was a good opportunity to investigate into the interpreter implementation and to confirm that Squirrel is so versatile that I could modify the syntax to my liking.

The most sad thing is that I like every other aspect of Squirrel language. You know, Lua sucks in so many ways. And so does JavaScript.
#22 Posted : Friday, April 8, 2016 2:44:44 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 8/23/2014(UTC)
Posts: 109
Location: Northern Germany & Lincolnshire, U.K.

Thanks: 1 times
Was thanked: 10 time(s) in 10 post(s)
Alberto, will you marry me? :-D *thumbs up*
Users browsing this topic
Guest (2)
2 Pages<12
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Clean Slate theme by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.095 seconds.