Linked by Thom Holwerda on Thu 30th Jun 2005 12:26 UTC
General Development For Linux users, HLA is a strong programming tool that allows them to create powerful programs on a variety of different levels. As HLA becomes more feature-rich, additional applications will be written using HLA under Linux. With HLA and Linux, programmers can develop new and exciting applications anyone can use. Read more.
Permalink for comment
To read all comments associated with this story, please click here.
RE: C Escape sequences
by Randall Hyde on Fri 1st Jul 2005 16:38 UTC

ylai wrote:>>>>>>>>
I think you forgot what I have wrote at this point. It certainly has advantages for people programming intermixed C with another language. But again, you resort here to the "inverse problem", and avoids the issue that it is simlply not a technical reason not to use the C escape sequence.
<<<<<<<<<<<<<

Let's just leave it at this: HLA is *not* C. As pointed out already, most of the HLL-like syntax were derived from the Algol branch of the language tree rather than the C branch. C's use of apostrophes and quotes to differentiate strings and characters is a *good* thing, IMO, but C's escape sequences are not (again, IMO). Therefore, while I chose to adopt the C scheme of quotes and apostrophes, I chose to adopt the Pascal/Modula-2/Ada/etc. approach to embedding quotes within strings and the traditional *assembly language* way of embedded non-graphic symbols in HLA strings.

There are many things in HLA that aren't particularly convenient for C programmers. If they don't like it and they don't want to use HLA because it doesn't support C escape sequences in character strings, they can always use Gas, which does.

In general, C is not a good syntax to base a language upon if you're interested in producing a language that makes it easy to write readable code. Given that assembly language has a lot working against it in the readability department anyway, it's better *not* to adopt syntax from some language if there is a better syntax available.

Now we can argue all day long about whether C escape sequences are more readable than the approach HLA takes. However, having taught Assembly, Pascal, C, C++, and Ada at the university level for over ten years, I've got a pretty good feeling about what students find readable, and let me tell you that the average student finds C escape sequences confusing. Just my observation; but sufficient to convince me *not* to use that scheme in HLA.
Cheers,
Randy Hyde