Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-15 Thread Michael Schnell
On 11/15/2013 01:03 AM, Sieghard wrote: > And then, it's a little bit funny to read a statement against "source > code optimization" from a C programmer, when it is often an expressed > concern by such to keep their source code as optimized for their > compiler as possible... :-) This seems a

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-15 Thread Michael Schnell
On 11/14/2013 09:49 PM, Sieghard wrote: > >> For debugging you can define a lower Optimization level. > You can d that, of course. Often, then, the reason for debugging goes away. Optimization levels are only allowed to affect execution speed and code size. If the result of a function is diff

Re: [MSEide-MSEgui-talk] mseLang: Zero Based strings

2013-11-15 Thread Michael Schnell
On 11/15/2013 01:14 AM, Sieghard wrote: > I don't recall there was any mention that there should not be any > local variables within a procedure or function. >>> "You could also decide to make "pos" take a return variable parameter " a var parameter needs a variable to be given in the call.

Re: [MSEide-MSEgui-talk] MSElang, fixsize numeric base types

2013-11-15 Thread Michael Schnell
On 11/14/2013 09:28 PM, Sieghard wrote: > It might not be very neccessary if these types aren't compatible among each > other. Range checking has to be done only on coercion then, i.e. when > assigning a value cast from a - any - different type. I understand that Martin is (IMHO) correctly assuming

Re: [MSEide-MSEgui-talk] MSElang, fixsize numeric base types

2013-11-15 Thread Michael Schnell
On 11/14/2013 08:12 AM, Martin Schreiber wrote: > I don't like it. > Or with reserved words: > " > type > boolty = max: 8; //bool8 > cardty = 0 to max: 8;//card8 > intty = smin to smax: 8; //int8 > charty = #max: 8;//char8 > floatty = -.max to .max: 64;

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-15 Thread Martin Schreiber
On Thursday 14 November 2013 21:49:29 Sieghard wrote: > > I see. Eliminating the horrible hiding ambiguity by use of an alias does > > make sense. > > Not for me. For my part, I dislike the Oberon style "with" at least just > as much as you seem to dislike the Pascal style. > How do you suggest on

Re: [MSEide-MSEgui-talk] MSElang, fixsize numeric base types

2013-11-15 Thread Martin Schreiber
On Friday 15 November 2013 07:33:08 Martin Schreiber wrote: > or > " > type > boolty = :8;//bool8 > cardty = :+8; //card8 > intty = :-8;//int8 > charty = :#8; //char8 > floatty = :.64; //flo64 > recordty > b: :8; //bool8 > c: :+8; //card8 > i: :-8; //int8 > ch: :#8; /

Re: [MSEide-MSEgui-talk] MSElang, fixsize numeric base types

2013-11-15 Thread Martin Schreiber
On Friday 15 November 2013 09:37:29 Michael Schnell wrote: > On 11/14/2013 08:12 AM, Martin Schreiber wrote: > > I don't like it. > > Or with reserved words: > > " > > type > > boolty = max: 8; //bool8 > > cardty = 0 to max: 8;//card8 > > intty = smin to smax: 8; //int

Re: [MSEide-MSEgui-talk] MSElang, fixsize numeric base types

2013-11-15 Thread Martin Schreiber
On Friday 15 November 2013 09:33:32 Michael Schnell wrote: > On 11/14/2013 09:28 PM, Sieghard wrote: > > It might not be very neccessary if these types aren't compatible among > > each other. Range checking has to be done only on coercion then, i.e. > > when assigning a value cast from a - any - di

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-15 Thread Michael Schnell
On 11/15/2013 10:06 AM, Martin Schreiber wrote: > > How do you suggest one should solve the Pascal "with" problem that it is > possible that an additional field in the "with" record can hide already used > names in existing "with" statements with that record? > +1 IMHO there is no decent way to ha

Re: [MSEide-MSEgui-talk] MSElang, fixsize numeric base types

2013-11-15 Thread Michael Schnell
On 11/15/2013 10:21 AM, Martin Schreiber wrote: > > That is not enough, keywords for boolean, character and float types are > necessary too. > Boolean: of course it needs to be possible to define 1 Bit booleans, so using the same syntax does make sense But I doubt that providing bitcount-restrict

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-15 Thread Martin Schreiber
On Friday 15 November 2013 13:42:02 Michael Schnell wrote: > On 11/15/2013 10:06 AM, Martin Schreiber wrote: > > How do you suggest one should solve the Pascal "with" problem that it is > > possible that an additional field in the "with" record can hide already > > used names in existing "with" sta

Re: [MSEide-MSEgui-talk] MSElang, fixsize numeric base types

2013-11-15 Thread Martin Schreiber
On Friday 15 November 2013 13:46:48 Michael Schnell wrote: > On 11/15/2013 10:21 AM, Martin Schreiber wrote: > > That is not enough, keywords for boolean, character and float types are > > necessary too. > > Boolean: of course it needs to be possible to define 1 Bit booleans, so > using the same sy

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-15 Thread Michael Schnell
On 11/15/2013 02:00 PM, Martin Schreiber wrote: > Why? Do you never work with variant records? No. > There and with records > generally "with" is a good aid to structure the code. > Anyway: sorry for not being clear enough. I meant the "with" keyword for denoting the record the fields denoted aft

Re: [MSEide-MSEgui-talk] MSElang, fixsize numeric base types

2013-11-15 Thread Michael Schnell
On 11/15/2013 02:08 PM, Martin Schreiber wrote: > > How do you define char8/char16/char32 float32/float64 then if you don't want > to be forced to write the range? Neither a bit limitation nor a range makes sense for floats. Bits: you would need to specify a bit count as well for the Mantissa and

Re: [MSEide-MSEgui-talk] MSElang, fixsize numeric base types

2013-11-15 Thread Ivanko B
Compile time range checks already have a benefit. == Sure. Anyaway specifing (or assuming) bitlength is range check as well :) Also if range is 2pwrN then overflow check may rely on CPU hardware (checking its Overflow flag with a single "JNO" ASM ibstruction). -

[MSEide-MSEgui-talk] MSElang, ';' is statement terminator

2013-11-15 Thread Martin Schreiber
Hi, Because code should always look the same I think ';' should become a mandatory statement terminator instead a separator as in Pascal. In order to be consequent ';' in procedure and function headers should be replaced by ',' -> ',' = separator, ';' = terminator. Therfore using a single typena

Re: [MSEide-MSEgui-talk] MSElang, fixsize numeric base types

2013-11-15 Thread Sieghard
Hallo Martin, Du schriebst am Fri, 15 Nov 2013 07:18:59 +0100: > > could you do this if the values depend on some unspecified type? > > Use something like "max (boolty)" or "min (l)"? > > > No, max (or another keyword) denotes "maximum of the value with the given > bit count". Fine. _What_ bit c

Re: [MSEide-MSEgui-talk] MSElang, fixsize numeric base types

2013-11-15 Thread Sieghard
Hallo Michael, Du schriebst am Fri, 15 Nov 2013 09:33:32 +0100: > > It might not be very neccessary if these types aren't compatible among ^^^ > I understand that Martin is (IMHO) correctly assuming that range > restricted numerica

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-15 Thread Sieghard
Hallo Martin, Du schriebst am Fri, 15 Nov 2013 10:06:53 +0100: > How do you suggest one should solve the Pascal "with" problem that it is > possible that an additional field in the "with" record can hide already > used names in existing "with" statements with that record? Why bother? Who's resp

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-15 Thread Sieghard
Hallo Michael, Du schriebst am Fri, 15 Nov 2013 09:06:52 +0100: [A whole lot about compiler optimizations] > Decent C programmers do take advantage of this to make their source code > more readable. And yet, there are - probabely still just as many - C programmers that don't trust their compile

Re: [MSEide-MSEgui-talk] MSElang, fixsize numeric base types

2013-11-15 Thread Sieghard
Hallo Martin, Du schriebst am Fri, 15 Nov 2013 07:33:08 +0100: > type > boolty = :8;//bool8 > cardty = :+8; //card8 > intty = :-8;//int8 > charty = :#8; //char8 What's the difference between "#" and "+"? Why do you think it should be neccessary? What's the difference between "boo

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-15 Thread Sieghard
Hallo Michael, Du schriebst am Fri, 15 Nov 2013 09:10:37 +0100: > On 11/14/2013 09:49 PM, Sieghard wrote: > > > >> For debugging you can define a lower Optimization level. > > You can d that, of course. Often, then, the reason for debugging goes > > away. > > Optimization levels are only all

Re: [MSEide-MSEgui-talk] MSElang, ';' is statement terminator

2013-11-15 Thread Marcos Douglas
On Fri, Nov 15, 2013 at 1:24 PM, Martin Schreiber wrote: > Hi, > Because code should always look the same I think ';' should become a mandatory > statement terminator instead a separator as in Pascal. > In order to be consequent ';' in procedure and function headers should be > replaced by ',' ->

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-15 Thread Marcos Douglas
On Thu, Nov 14, 2013 at 9:52 PM, Sieghard wrote: > Hallo Marcos, > > Du schriebst am Wed, 13 Nov 2013 22:26:19 -0200: > >> >> The compiler should provide a way to assign a directory to a >> >> 'Namespace' named by programmer, eg: Synapse. >> > >> > Why a "directory"? Why not a specific file? Or, w

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-15 Thread Sieghard
Hallo Michael, > But IMHO it is better to avoid the "with" keyword altogether and use a > pointer Says the C programmer and creates the next buffer overflow failure. You _do_ know that pointer errors make for most of the scurity problems of software overall, relegating any other errors to dista

Re: [MSEide-MSEgui-talk] mseLang: Zero Based strings

2013-11-15 Thread Sieghard
Hallo Michael, Du schriebst am Fri, 15 Nov 2013 09:18:53 +0100: > > I don't recall there was any mention that there should not be any > > local variables within a procedure or function. > > >>> "You could also decide to make "pos" take a return variable > parameter " > a var parameter nee

Re: [MSEide-MSEgui-talk] MSElang, ';' is statement terminator

2013-11-15 Thread Sieghard
Hallo Martin, Du schriebst am Fri, 15 Nov 2013 16:24:04 +0100: > Because code should always look the same I think ';' should become a > mandatory statement terminator instead a separator as in Pascal. > In order to be consequent ';' in procedure and function headers should be > replaced by ',' -

Re: [MSEide-MSEgui-talk] MSElang, ';' is statement terminator

2013-11-15 Thread Martin Schreiber
On Friday 15 November 2013 22:42:29 Marcos Douglas wrote: > On Fri, Nov 15, 2013 at 1:24 PM, Martin Schreiber wrote: > > Well, I think not need to change this but if you will change anyway, I > vote in #1 option: > " > procedure test(para: int32, parb: int8, parc: boolean); > " > or: > " > proced

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-15 Thread Martin Schreiber
On Friday 15 November 2013 22:08:03 Sieghard wrote: > Hallo Martin, > > Du schriebst am Fri, 15 Nov 2013 10:06:53 +0100: > > How do you suggest one should solve the Pascal "with" problem that it is > > possible that an additional field in the "with" record can hide already > > used names in existin

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-15 Thread Martin Schreiber
On Friday 15 November 2013 22:58:02 Marcos Douglas wrote: > >> My idea is to use a "item" using a "virtual name" instead of the real > >> name. Just it. > > > > I.e., use compiler macros. > > I do not know how Martin will implement this. I guess he will chose > the simple way... if is compiler mac