Csound Csound-dev Csound-tekno Search About

Re: if...

Date1999-02-24 00:22
FromRichard Dobson
SubjectRe: if...
One reason might be that Csound was designed to ~have~ an assembly-like
syntax, and if...then...else is not a cpu-level instruction.

You can get into all sorts of problems if you mix two syntax paradigms
in one language, bacause int would not be genuine C, but merely a
simulacrum - other legitimate C-style code such as

	aout = balance(x,y,balance(f,g,h));

would not be possible, thought the syntax might suggest it is. In any
case, ~replacing~ existing Csound syntax with a different one will
simply break everybody's work, and is not an option. The only
hypothetical possibiity would be to allow both forms, and that would get
everything, and everyone, into an almighty muddle!

Also , there is the cultural question - why C? Why not Basic, Lisp,
Pascal, Forth,Occam...



Richard Dobson




Aaron Isaksen wrote:
> 
> > I absolutely agree a "statement" block would help to make the code more readable
> > and elegant. Too much goto´s are never advisable,
> > and it doesn´t look too serious really. It makes Csound code seem an
> > oldfashioned language ;-)
> 
> Why not make the parser understand c-like syntax?
> 
> aout = balance(x,y,z); // comment
> 
> instead of assemblyesque
> aout    balance         x,y,z ; comment
> 
> -Aaron

-- 
Test your DAW with my Soundcard Attrition Page!
http://wkweb5.cableinet.co.uk/rwd

Date1999-02-24 17:16
FromAaron Isaksen
SubjectRe: if...
> 
> 	aout = balance(x,y,balance(f,g,h));
> 
> would not be possible, thought the syntax might suggest it is

thats what type checking is for.

-Aaron