Hacker News new | past | comments | ask | show | jobs | submit | exitcode0's comments login

Neat! Interestingly Ada has had this feature since its inception around 1983 (use in action with CPUID - https://gist.github.com/AdaDoom3/6466215).


Rust is meant to be a practical language, not a research project, so it’s not playing the game of firsts:

http://venge.net/graydon/talks/intro-talk-2.pdf

> Rust is a language that mostly cribs from past languages. Nothing new

[…]

> Rust picks from 80s / early 90s languages


It is nothing new, all high level systems programming languages used to have inline Assembly, and ESPOL in 1961 already had intrisics instead.


What other suggestions do you have besides changes to the case statements?


Ada++ makes two changes to the Ada language. First, it changes some keywords into new keywords or symbols, but in a gross way (the case example, is becomes : as a blanket rule, even when it leads to : being paired with }). This could be done by a (tedious) awk program or sed script. The second change it makes is that use will also with a package, that's a nice ergonomic feature. But it's the only thing of modest complexity that it does to change the language. There are no other enhancements to the language that it introduces that make it a compelling thing or an obvious non-joke (it's release date for 0.2.0 was 1 April 2021).

The actual Ada developers are focused on actual language enhancements with the Ada 2022 standard and increasing the scope of properties that SPARK (a proper subset of Ada now) can prove about a program. Including approaching some of the properties that people find desirable with Rust's borrow checker and lifetime analysis. Ada++ should be doing things like that, meaningfully improving the language and not just being a glorified awk program that doesn't change or add any real syntactic or semantic properties of the language. Also, the author should stop doing releases on April Fool's Day if they really want to be taken seriously.


It is an April Fools Day joke. They forked GCC and made one commit on April Fools Day 2021, and haven't touched it sense.

Compare:

Ada++ -- https://github.com/AdaPlusPlus/gcc/commits/master

GCC 10 (history from April 2021) -- https://github.com/gcc-mirror/gcc/commits/releases/gcc-10?af...


While I agree, the person I initially responded to has, in the past, asserted that they made it and that it is not a joke. They've remained committed to it for a couple years now and have, at times, misled or attempted to mislead people into thinking it was a serious effort. So when I catch them trying to do it again, I call them out.

https://news.ycombinator.com/item?id=29081047

It seems that they are either ludicrously committed to the joke, or have convinced themselves that it's a serious effort despite all evidence to the contrary.


The joke was on AdaCore's website.


? When was Ada++ ever on AdaCore's site?



Well, I think my confusion was reasonable since the previous comments were all about Ada++ (the joke that 0xDEEPFAC has decided is serious).


I would create Ada++ - so that people could use the power of Ada in a syntax more familar to them.

http://adapplang.com/


You will always be welcome in the Ada++ community : )

http://www.adapplang.com/


I got as far into the tutorial as "Ada++ requires variable declarations to be made in a specific area called the declarative part", said "that's stupid" (actually out loud), and abandoned it.

Then wrote this. (You're welcome.)

Even C ditched its separate section for variable declarations.


I understand how it can be frustrating, but it can also be super helpful.

I'm not super familiar with Ada++, but in Ada all declaration areas are the same. You can declare anything (types, functions, variables, tasks i.e. threads, or even full packages) in any declaration area. This is actually somewhat powerful in being able to write everything locally and then refactor it out to where it belongs.

Writing tasks in declarations is interesting because they operate like C++ jthreads, so the related block of statements won't exit until all threads complete. You can get around this by detaching work by using allocators, but that's more advanced.


The advantage of declare blocks would be the structure they provide - both in terms of understanding how much memory usage a subprogram can have in branching scenarios, but also as a way of showing the programmer possible areas where the problem might be better broken up into smaller pieces.

Note that within these declare blocks you may also declare new types and further subprograms - something which cannot be done within the body of a C function. Imagine the possibilities there : )


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: