Thread overview | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
January 09, 2020 Beeflang - open source performance-oriented compiled programming language | ||||
---|---|---|---|---|
| ||||
There's some new programming language around, seems to be targeting similar areas as D does, although it doesn't use GC and seems to be targeted mostly towards game developers. https://www.beeflang.org/ Announcement and discussion: https://news.ycombinator.com/item?id=21991382 |
January 09, 2020 Re: Beeflang - open source performance-oriented compiled programming language | ||||
---|---|---|---|---|
| ||||
Posted in reply to JN | On Thursday, 9 January 2020 at 07:54:22 UTC, JN wrote:
> There's some new programming language around, seems to be targeting similar areas as D does, although it doesn't use GC and seems to be targeted mostly towards game developers.
>
> https://www.beeflang.org/
>
> Announcement and discussion: https://news.ycombinator.com/item?id=21991382
Wow, at first sight looks like native c# on steroids.
|
January 09, 2020 Re: Beeflang - open source performance-oriented compiled programming language | ||||
---|---|---|---|---|
| ||||
Posted in reply to JN | On Thursday, 9 January 2020 at 07:54:22 UTC, JN wrote:
> There's some new programming language around, seems to be targeting similar areas as D does, although it doesn't use GC and seems to be targeted mostly towards game developers.
>
> https://www.beeflang.org/
>
> Announcement and discussion: https://news.ycombinator.com/item?id=21991382
It's look like a very competent language and it is just being released to the public.
Things that I like is that it has manual memory management, no GC or stupid life times. However, leaking or double free can be detected. Good direction I think for memory management for what the language is intended for.
It has mixins just like D.
... then the weird, it has a PREPROCESSOR that is even less capable than C. That's a very weird design decision.
|
January 09, 2020 Re: Beeflang - open source performance-oriented compiled programming language | ||||
---|---|---|---|---|
| ||||
Posted in reply to IGotD- | On Thursday, 9 January 2020 at 11:59:42 UTC, IGotD- wrote:
> ... then the weird, it has a PREPROCESSOR that is even less capable than C. That's a very weird design decision.
There's quite a bit of weirdness in Beef that has been copied over from C#. The preprocessor is one example. It is pretty much as capable as the one in C#. There it exists mostly to enable conditional compilation.
One other feature that seems to be inspired a bit by D is how the scope keyword forces objects to be allocated on stacks. It can also limit their lifetime to named blocks instead of the entire function.
|
January 09, 2020 Re: Beeflang - open source performance-oriented compiled programming language | ||||
---|---|---|---|---|
| ||||
Posted in reply to JN | On Thursday, 9 January 2020 at 07:54:22 UTC, JN wrote:
> There's some new programming language around, seems to be targeting similar areas as D does, although it doesn't use GC and seems to be targeted mostly towards game developers.
>
> https://www.beeflang.org/
>
> Announcement and discussion: https://news.ycombinator.com/item?id=21991382
Thanks for sharing. The language itself looks pretty standard, but it claims to provide two features that could be a selling point for interactive applications: good C++ interop and hot patching. If they deliver on that, then they could be in a good positition.
|
January 09, 2020 Re: Beeflang - open source performance-oriented compiled programming language | ||||
---|---|---|---|---|
| ||||
Posted in reply to IGotD- | On Thursday, 9 January 2020 at 11:59:42 UTC, IGotD- wrote:
> On Thursday, 9 January 2020 at 07:54:22 UTC, JN wrote:
>> There's some new programming language around, seems to be targeting similar areas as D does, although it doesn't use GC and seems to be targeted mostly towards game developers.
>>
>> https://www.beeflang.org/
>>
>> Announcement and discussion: https://news.ycombinator.com/item?id=21991382
>
> It's look like a very competent language and it is just being released to the public.
>
> Things that I like is that it has manual memory management, no GC or stupid life times. However, leaking or double free can be detected. Good direction I think for memory management for what the language is intended for.
>
> It has mixins just like D.
>
> ... then the weird, it has a PREPROCESSOR that is even less capable than C. That's a very weird design decision.
Well, this sums up everything, including the preprocessing which is exactly the same as C#:
" I wrote a C#-to-C++ transpiler and a VM wrapper with a concurrent GC. This predated Unity's IL2CPP by about 6 months.
Compile times were a big issue, and the little edges of the language and libraries were problematic since they were built around a JIT. Then it struck me that I don't really care about the JIT, and the reason I liked C# had nothing to do with the GC, and it would be much better to just make a slight variation of C# that was statically compiled and without a GC.
I just followed along all the obvious next steps from there, and here we are 5 years later."
|
January 09, 2020 Re: Beeflang - open source performance-oriented compiled programming language | ||||
---|---|---|---|---|
| ||||
Posted in reply to Gregor Mückl | On Thursday, 9 January 2020 at 12:14:53 UTC, Gregor Mückl wrote:
> On Thursday, 9 January 2020 at 11:59:42 UTC, IGotD- wrote:
>> ... then the weird, it has a PREPROCESSOR that is even less capable than C. That's a very weird design decision.
>
> There's quite a bit of weirdness in Beef that has been copied over from C#. The preprocessor is one example. It is pretty much as capable as the one in C#. There it exists mostly to enable conditional compilation.
>
> One other feature that seems to be inspired a bit by D is how the scope keyword forces objects to be allocated on stacks. It can also limit their lifetime to named blocks instead of the entire function.
Also `defer { }` is like `scope (exit) { }`.
But I doubt the author is inspired by D **at all**.
1. the pre-processor. no trace of any affiliation to D there (`version()`, `static if`
etc.)
2. attributes. no trace of any affiliation to D there either (@ + introspection using
__traits)
3. syntax for template declaration. It does not even propose to fix the big C++ error. D
fixes it at least
4. `public` `public` `public` `public` `public` like in JAVA. Any influence of D here
would have be to follow the principle of least astonishment.
Now there are things I didn't like, i.e 'personally'.
1. sparse documentation. no global EBNF, no doc section for the declaration.
2. the project source tree. hard to find the compiler. it's hidden in IDEHelper ?
3. no linux binaries provided. Because the doc doesn't specify very well the things so I
wanted to quick test if out of order declarations are supported, mutually dependent
namespaces, aliases, etc. because this is something that tells much if a language is
powerful or not.
4. A conservative (CastTo)exp. I think that casts are important enough to make them well
distinctguishable like D `cast`.
5. `repeat {} while ()` and `do {}` lacks of orthogonality. `do {} while (false);` could
have been used instead, saving `repeat`. This new statement a very few value added
but I understand that it's tempting to invent small things like that when creating a
language.
A few good points however
1. `??` and `?.` operators. D failed to get those.
2. sane `switch` with implicit `break` and explicit `fallthrough`.
|
January 09, 2020 Re: Beeflang - open source performance-oriented compiled programming language | ||||
---|---|---|---|---|
| ||||
Posted in reply to Basile B. | On Thursday, 9 January 2020 at 16:58:16 UTC, Basile B. wrote:
> 5. `repeat {} while ()` and `do {}` lacks of orthogonality. `do {} while (false);` could
> have been used instead, saving `repeat`. This new statement a very few value added
> but I understand that it's tempting to invent small things like that when creating a
> language.
do {} has a separate meaning in beef. These blocks are not looping, but using break; is valid in them to skip to their end. While this is certainly creative, I don't know if it all that useful. But it burns the "do" keyword in the grammar and something else is required to start a do/while block.
|
January 09, 2020 Re: Beeflang - open source performance-oriented compiled programming language | ||||
---|---|---|---|---|
| ||||
Posted in reply to Gregor Mückl | On Thursday, 9 January 2020 at 17:19:38 UTC, Gregor Mückl wrote: > On Thursday, 9 January 2020 at 16:58:16 UTC, Basile B. wrote: >> 5. `repeat {} while ()` and `do {}` lacks of orthogonality. `do {} while (false);` could >> have been used instead, saving `repeat`. This new statement a very few value added >> but I understand that it's tempting to invent small things like that when creating a >> language. > > do {} has a separate meaning in beef. These blocks are not looping, but using break; is valid in them to skip to their end. While this is certainly creative, I don't know if it all that useful. But it burns the "do" keyword in the grammar and something else is required to start a do/while block. Yes I understand the difference but by using `while (false)` in D for the looping condition you get the **same semantic** as Beef's `do {}`. Than a small AST rewrite or more simply the backend optimizations get ride very extremely easily of the codegen for the useless looping condition example: https://godbolt.org/z/LgHL_V |
January 09, 2020 Re: Beeflang - open source performance-oriented compiled programming language | ||||
---|---|---|---|---|
| ||||
Posted in reply to Gregor Mückl | On Thursday, 9 January 2020 at 17:19:38 UTC, Gregor Mückl wrote:
> [snip]
>
> do {} has a separate meaning in beef. These blocks are not looping, but using break; is valid in them to skip to their end. While this is certainly creative, I don't know if it all that useful. But it burns the "do" keyword in the grammar and something else is required to start a do/while block.
I think his point is that do {} while(false) is basically a non-looping do statement. So you can use breaks within it like below (adapting the example from beeflang.org). The only difference I can see is that you can return from Beef's do statement. There's probably a way to do that in D, but I haven't thought a lot about it.
void main() {
int result;
do {
int c = 2;
if (c == 0)
break;
string op = "+";
if (op != "+")
break;
int c2 = 3;
if (c2 == 0)
break;
result = c + c2;
} while (false);
assert(result == 5);
}
|
Copyright © 1999-2021 by the D Language Foundation