The BETA Programming Language
cs.au.dk
cs.au.dk
There are some interesting and unique concepts in BETA, but IIRC the most interesting is the "pattern":
>The abstraction mechanisms include class, procedure, function, coroutine, process, exception and many more, all unified into the ultimate abstraction mechanism: the pattern. In addition to the pattern, BETA has subpattern, virtual pattern and pattern variable. This unification gives a uniform treatment of abstraction mechanisms and a number of new ones. Most object-oriented languages have classes, subclasses and virtual procedures, and some have procedure variables. Since a pattern is a generalization of abstraction mechanisms like class, procedure, function, etc., the notions of subpattern, virtual pattern and pattern variable also apply to these abstraction mechanisms. In addition to the above mentioned abstraction mechanisms, the pattern subsumes notions such as generic package and task type as known from Ada.
[1] http://kristennygaard.org/FORSKNINGSDOK_MAPPE/F_BETA_hovedsi...
[1] http://dtrace.org/blogs/bmc/2012/10/08/a-systems-software-do...
http://cs.au.dk/~beta/doc/beta-intro/Quick-Reference-Card.ht... http://cs.au.dk/~beta/BETAbookExamples/BETAbookCode.html
I don't know if this language could have a nicer style just because of the punctuation — it's everywhere! But still, it may be possible.
(# Heavy: ^Syntax;
do
&NotBeautiful[]->ToLookAt[];
&PleaseRemove[]->AllThoseRandomCharacters[];
#)
--- there must be another way ---
--- and use spaces --- (# Heavy: ^Syntax;
do {
&NotBeautiful()=>ToLookAt();
&PleaseRemove()=>AllThoseRandomCharacters();}
)
;sub NotBeautiful{};sub ToLookAt{}
;sub PleaseRemove{};sub AllThoseRandomCharacters{}that said, I've heard similar arguments about lack of beauty strongly typed languages ..especially in the mid 2000s when the pendulum seemed to be on opposite end of its swing.
sooo. I dunno - probably best to look at what kinds of things can be done with this tool effectively relative to other tools that could be used. I can do A LOT with my circular saw, but there are many cases where reciprocating saw is a better idea.
Edit: I used to write a lot of C code - and for the longest time turned up my nose at that "toy scripting language : javascript." Then a buddy who I respected set me straight in terms of it being a "real language" which coincided with the very early days of node.js. This also led me to dive into python .. after years of ignoring another guy who said it was pure joy. now I take a totally different view of languages that show up on the radar (although I'm still having a hard time grokking rust).
...hey, for loops that take just a single integer and implicitly loop from 1. Interesting.
Just checked my (Objective-)C loops, and of the 500 with
for (i=
440 start with for (i=0;
That's 88%. So looping on integers that implicitly forms a range starting from 0 seems like a reasonable addition for Objective-Smalltalk. "Looping" is already defined as higher order functions on collections and ranges, so all we need to do is map the number to the appropriate range and done. -(void)do:aBlock
{
[[@(0) to:[self sub:@(1)]] do:aBlock];
}
Try it out: > 4 do:[ :i | stdout println:i ]
0
1
2
3
Nice. Thank you, BETA!EINE is a recursive acronym for "EINE Is Not Emacs", and ZWEI follows this pattern as an acronym for "ZWEI Was Eine Initially".
It was first released in 1992
The language is quite powerful, sadly its concepts never managed to get into mainstream.