4 ms·
As always, all languages, especially the new one, should have a "why" section. Small caveat: maybe it's still under construction and the person that posted it j
by Zababa 5y ago
As always, all languages, especially the new one, should have a "why" section. Small caveat: maybe it's still under construction and the person that posted it just found it too early. But once you're ready to show it to the world, please include the why! Note that anything is valid in the "why", even "just for fun" or "because I could". For now there is:
> Senegal is a powerful, small-but-fast, concurrent, class-based, and dynamically-typed programming language with a modern syntax.
I think the closest thing to it is Wren? https://wren.io/ https://wren.io/. The difference being that Senegal is compiled and Wren is interpreted.
A few things of interest:
- there are exceptions
- you can call some C code: https://lang-senegal.web.app/docs/cimport https://lang-senegal.web.app/docs/cimport
- you can "enhance" (monkey patch?) classes: https://lang-senegal.web.app/docs/enhance https://lang-senegal.web.app/docs/enhance
- classic C-style for, while, switch keywords
- there's a pipeline operator, but it's <| https://lang-senegal.web.app/docs/pipeline https://lang-senegal.web.app/docs/pipeline
- the reference to "switch statements" probably means that switch and if are statements, not expressions
- 1MachineElf 5y agoSupport for Windows, MacOS, and Linux is also a plus.
- pansa2 5y ago> Senegal is compiled and Wren is interpreted Senegal seems to use a bytecode interpreter: https://github.com/SenegalLang/Senegal/blob/22fe863ad234e43ab25a5328bf8e6bd6a189331b/src/svm.c#L1531 https://github.com/SenegalLang/Senegal/blob/22fe863ad234e43a...
- cageface 5y agoAlso picking a name that can easily and unambiguously searched on is a big plus.
- Zababa 5y agoThat's true, though many languages don't respect that (Go, Java, Rust).
- deleted 5y ago[deleted]
- jmnicolas 5y agoRust and especially Go have no excuse. Java is old enough that "SEO" wasn't much a priority back then.
- scriptproof 5y agoAdd Python, Dart, Julia, Eiffel, Pascal...
- julienpalard 5y agoAdd ABC, B, C, D, C++, F#, C#, ...
- shagmin 5y agoI always just search for golang, rustlang, etc.,.
- V-2 5y agoWhen Java was created, this wasn't a factor to consider yet
- c014b6ec5be9 5y agoSurely this is the responsibility of the person posting this on HN, not the person who put the code on github. The owner of this repo owes absolutely nothing to random commenters on HN.
- Zababa 5y agoAs I've said: > maybe it's still under construction and the person that posted it just found it too early. But once you're ready to show it to the world, please include the why! So I don't think we disagree here. > The owner of this repo owes absolutely nothing to random commenters on HN. It's not about "owing" anything to anyone, it's about giving useful feedback. If the language has no way to do IO, and nowhere it says that it's a feature, I would have included the lack of IO in my feedback. The author is free to ignore my feedback, just like I'm free to give constructive feedback.