General Question — Notation

Bastiaan Olij bastiaan at basenlily.me
Thu Mar 12 19:29:12 EDT 2015


Hi George,

There are pro's and con's. The other guys have already pointed out some.
I'm going a bit further.

There are two main key drivers for notation:

The first is simply the structure it provides.
Calculate
$cinst.$objs.ContainerField.$objs.ComplexGrid.$objs.FieldOnComplexGrid.6.$visible
as kTrue
Is a whole lot easier then trying to find some sort of equivalent in
4GL. I'm not even sure if you can think of a nice way to write that in
4GL without expanding this to 6 or 7 commands.

The second could be argued is part of the move to OO but also the simple
inherent dangers in using global state as it is in Classic.

For each line in list...
end for

Which list?! Yeah the current one, but what if one of your team mates
changed the current list in a method you called just before your loop
because he didn't know your code called his method and he needed the
current list to change where he uses his method himself? All of a sudden
your for loop handles the wrong list.
If him changing the current list is subject to a condition that isn't
always true, that is one hard bug to find.

For myList.$line from 1 to myList.$linecount
end for

Not only have I no longer got the need to set the current list
somewhere, my code now becomes explicit. There are no ifs or buts, this
for loop works on the list it is intended to work on.

Now lists are simple but because you can now have multiple instance of
the same class, so you can have the same window open multiple times,
that explicitness becomes paramount. Alot of the old style of coding in
Classic assumed there was only one instance of your window, that same
code in Studio would likely interact with the wrong instance. Have two
windows open for the same class, something you do in window A may
inadvertently do something in Window B.

However I'm going to play devils advocate for a moment as well.

As natural as this step feels to me, and as used to notation I've
become, I firmly believe it wasn't necessarily the best step to make.

First on the practical side, Doug made the observation that notation can
be faster, and this is definitely true. $sendall comes to mind and is an
amazing bit of kit.
That said, our for loop up above, is slower in its notation form then it
is in its old "for each line in list" form. The way the old 4GL code got
"tokonized" did away with an amazing amount of overhead usually
associated with runtime languages.

But more so on a theoretical side. Omnis' approach at implementing their
4GL language, and the way it was integrated into the IDE, was a stroke
of pure brilliance. It requires a lot less programming know how and is a
lot easier and more intuitive to understand. While I am not sure how you
would solve certain things we now do notationaly in 4GL without running
into heaps of issues with the more complex scope inherent with OO there
is was a certain simplicity to 4GL that made Omnis Classic a joy to work
with.

I feel Omnis Studio as a result appeals much less to those who are
comfortable with the style of development that was applicable in Omnis
Classic and leans much more to the more traditional 3GL languages which
may have more to offer then Omnis Studio has. In some ways Omnis has
lost a little of the edge it had over its competition by going down the
path they have.

Cheers,

Bas


On 13/03/2015 7:46 am, George Ziemann wrote:
> I've been using Omnis since Omnis 3. Used Studio 2 and now have Studio 6.1,
> so I'm up-to-date for the moment.
>
> I've been watching this list and notice that every answer to every question
> involves using notation. I have no general issue with this and have been
> slowly adapting to using notation to get more granular control over things
> (and to replace old processes that break after an upgrade because the old
> method has been deprecated/discontinued), but most of the old Omnis
> functions still work fine for me.
>
> My question is: What is the overwhelming reason to convert to using
> notation instead of the traditional Omnis functions? Is it performance?
> More control? Or is it because the old functions are gradually being phased
> out?
>


-- 
Kindest Regards,

Bastiaan Olij
e-mail: bastiaan at basenlily.me
web: http://www.basenlily.me
Skype: Mux213
http://www.linkedin.com/in/bastiaanolij




More information about the omnisdev-en mailing list