[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: space vs semicolon - why syntax error with the former ? (octave-3.4.
From: |
Jordi Gutiérrez Hermoso |
Subject: |
Re: space vs semicolon - why syntax error with the former ? (octave-3.4.2) |
Date: |
Tue, 16 Aug 2011 17:29:53 -0500 |
On 16 August 2011 17:13, Sergei Steshenko <address@hidden> wrote:
> I am widening my question: why comma is more acceptable than space too:
>
> "
> octave:1> for ii = 1:1 ii endfor,disp(ii);
> ii = 1
> 1
> octave:2>
> "
> ?
>
> I still want to see a _logical_ argument about unacceptability of space
> in this case.
Languages have syntax. If you prefer to not have the least syntax
possible, use lisp. Btw, Perl, which you seem to think of as a normal
language, has the weird quirk that if($foo) do_bar(); is a syntax
error and instead you need if($foo) {do_bar();} for no good reason. C
and C++ don't need the extra braces, but Perl does (Perl also needs a
lot of other unnecessary things, like making the user spell out
explicitly if something is a reference or a value). Python has
whitespace. C++ has templates. Octave has semicolons.
Facts of life.
If you want to make Octave a normal language, patches are probably welcome:
http://hg.savannah.gnu.org/hgweb/octave/file/b80b18f537ca/src/oct-parse.yy
- Jordi G. H.
- space vs semicolon - why syntax error with the former ? (octave-3.4.2), Sergei Steshenko, 2011/08/16
- Re: space vs semicolon - why syntax error with the former ? (octave-3.4.2), Ben Abbott, 2011/08/16
- Re: space vs semicolon - why syntax error with the former ? (octave-3.4.2), Sergei Steshenko, 2011/08/16
- Re: space vs semicolon - why syntax error with the former ? (octave-3.4.2), Ben Abbott, 2011/08/16
- Re: space vs semicolon - why syntax error with the former ? (octave-3.4.2), Sergei Steshenko, 2011/08/16
- Re: space vs semicolon - why syntax error with the former ? (octave-3.4.2), CdeMills, 2011/08/16
- Re: space vs semicolon - why syntax error with the former ? (octave-3.4.2), Sergei Steshenko, 2011/08/16
- Re: space vs semicolon - why syntax error with the former ? (octave-3.4.2), Przemek Klosowski, 2011/08/16
- Re: space vs semicolon - why syntax error with the former ? (octave-3.4.2), Sergei Steshenko, 2011/08/16
- Re: space vs semicolon - why syntax error with the former ? (octave-3.4.2),
Jordi Gutiérrez Hermoso <=
- Re: space vs semicolon - why syntax error with the former ? (octave-3.4.2), Jordi Gutiérrez Hermoso, 2011/08/16
Re: space vs semicolon - why syntax error with the former ? (octave-3.4.2), CdeMills, 2011/08/17