News for hackers. Stuff that matters.
Re:LemonScript: A typed programming language inspired by Typ... by tylermenezes on Friday November 26, 2021 @09:36PM (#29356741)
I don't think this is a particularly serious attempt at a programming language but it's impressive coming from a 13 year old.
Re:LemonScript: A typed programming language inspired by Typ... by flashgordon on Friday November 26, 2021 @10:38PM (#29357151)
Wait really? That is pretty impressive for a 13 year old. I'd say pretty impressive even for some one in their teens (even doing a toy language following the Stanford pl courses online is no easy feat!!).
Re:LemonScript: A typed programming language inspired by Typ... by tylermenezes on Saturday November 27, 2021 @08:05AM (#29359855)
That's what the author's Github profile says!
Re:LemonScript: A typed programming language inspired by Typ... by hn_throwaway_99 on Friday November 26, 2021 @11:25PM (#29357392)
Thanks, that context makes a lot more sense. Kudos to the author then.
Re:LemonScript: A typed programming language inspired by Typ... by slater on Friday November 26, 2021 @08:21PM (#29356202)
Re:LemonScript: A typed programming language inspired by Typ... by karmakaze on Friday November 26, 2021 @10:47PM (#29357198)
Notably absent (at least in the docs) is a Hash/Map datatype, a struct type may be beyond the goals of the language. I do see how it straddles Python and TypeScript in character. One thing I miss from TypeScript is the Union/Sum type which is far underutilized in languages.
Re:LemonScript: A typed programming language inspired by Typ... by maweki on Saturday November 27, 2021 @02:51AM (#29358406)
Proper union types are really hard if you want to do anything more than check. Once you're into inference territory, this gets really hard.

Look at Haskell's faux union Either. It should be true that Either a a = a but of course, it isn't and you always have to destructure this.

In inference it's easier to just infer one most general type instead of a (possibly infinite) number of sets of types.

Basicaly wherever types are ambiguous, you'd need to try all alternatives and possibly compile all of them.

Faux unions are also underused but we do find them from time to time.

Re:LemonScript: A typed programming language inspired by Typ... by stefanos82 on Saturday November 27, 2021 @10:34AM (#29360905)
Coincidence or not, it looks a lot like Lemon language.

http://www.lemon-lang.org/documentation

Re:LemonScript: A typed programming language inspired by Typ... by zfxfr on Saturday November 27, 2021 @12:57AM (#29357861)
The link leads to a 404 but there's a menu so it is not a big problem.
Re:LemonScript: A typed programming language inspired by Typ... by JDeArte on Friday November 26, 2021 @09:32PM (#29356717)
Inspired by Python? Like they overheard someone talking about Python before they implemented some feature? all I see are "{", "}", and ";" everywhere ;-)
Re:LemonScript: A typed programming language inspired by Typ... by lolinder on Friday November 26, 2021 @11:22PM (#29357384)
`init`, `self`, the comment syntax, `and`, `or`, and the import syntax are all pretty clearly python-inspired, to name a few. "Curly braces or no curly braces" is not the only syntax decision a language has to make.

There's obviously a lot more inspiration from typescript, but they do list python second in the title, so that's fair.

Re:LemonScript: A typed programming language inspired by Typ... by nhumrich on Friday November 26, 2021 @09:51PM (#29356845)
I think it's just the "print ()" syntax
Re:LemonScript: A typed programming language inspired by Typ... by masswerk on Saturday November 27, 2021 @08:38AM (#29360045)
Something suggests to me that PlebusSupremus1234 would have loved AS3.

(I still think that AS3 type hints were a viable approach.)

Re:LemonScript: A typed programming language inspired by Typ... by ianberdin on Saturday November 27, 2021 @04:43AM (#29358934)
You mean, PythonScript, right?