Page 1 of 2

Declare should be need only the type (no variable name)

Posted: Wed Oct 08, 2008 7:22 am
by IceSoft
Currently:

Code: Select all

Declare ScanDir.l(Dir.s, C.l, a.b, r.w) 
Better:

Code: Select all

Declare ScanDir.l(.s, .l, .a, .w) 

Re: Declare should be need only the type (no variable name)

Posted: Wed Oct 08, 2008 10:16 am
by traumatic
IceSoft wrote:

Code: Select all

Declare ScanDir.l(.s, .l, .a, .w) 
So what's better with that?

Re: Declare should be need only the type (no variable name)

Posted: Wed Oct 08, 2008 10:49 am
by PB
Less typing when the params have longer names.

Re: Declare should be need only the type (no variable name)

Posted: Wed Oct 08, 2008 11:01 am
by ts-soft
PB wrote:Less typing when the params have longer names.
Is not required to use the long names for declare.

Code: Select all

Declare ScanDir.l(a.s, b.l, c.b, d.w) 
Only the type and count must be correct

Re: Declare should be need only the type (no variable name)

Posted: Wed Oct 08, 2008 11:04 am
by IceSoft
ts-soft wrote:Is not required to use the long names for declare.

Code: Select all

Declare ScanDir.l(a.s, b.l, c.b, d.w) 
Only the type and count must be correct
Yes I know...that's the reason why I write this request.
The name of the variable is not checked...so it should be removed

Re: Declare should be need only the type (no variable name)

Posted: Wed Oct 08, 2008 11:16 am
by PB
> Is not required to use the long names for declare

I never knew that (I hardly ever use Declare, and when I do, I just copied
the procedure definition to save typing it all). I assumed everyone did it like
that. :lol:

Posted: Wed Oct 08, 2008 11:36 am
by Mistrel
I wrote a tool that parses my source code and copies all of the declares to the clipboard. One-click-- done. I consider your request to be an oversimplification to an adequate design.

Posted: Wed Oct 08, 2008 11:53 am
by IceSoft
Mistrel wrote:I wrote a tool that parses my source code and copies all of the declares to the clipboard. One-click-- done. I consider your request to be an oversimplification to an adequate design.
As easier as better.
The best ideas been often the easiest solution.
Look on lot of patents and you understand me.

As long you need a tool to remove/adapt something...as long it is not perfect.

Re: Declare should be need only the type (no variable name)

Posted: Wed Oct 08, 2008 2:54 pm
by traumatic
PB wrote:Less typing when the params have longer names.
Shouldn't params somehow be self-explanatory?
I'd really like to understand but I don't get the idea.
Well, on the other hand I don't have to ;)

Posted: Wed Oct 08, 2008 3:46 pm
by Kaeru Gaman
IceSoft wrote:As long you need a tool to remove/adapt something...as long it is not perfect.
“Perfection is reached not when there’s nothing left to add, but when there’s nothing left to remove.” (Antoine de St. Exupery)

PB wrote:(I hardly ever use Declare, and when I do, I just copied
the procedure definition to save typing it all)
=> no tool needed at all

IceSoft wrote:Currently:

Code: Select all

Declare ScanDir.l(Dir.s, C.l, a.b, r.w) 
Better:

Code: Select all

Declare ScanDir.l(.s, .l, .a, .w) 
... why not? wouldn't apply to me at all -> quote="PB"

Posted: Wed Oct 08, 2008 4:01 pm
by EdzUp[SD]
Declare ScanDir.l(Dir.s, C.l, a.b, r.w)
simple copy paste and a little adjustment would give

Procedure.l ScanDir(Dir.s, C.l, a.b, r.w)

surely just copy and paste then small adjustment is simple enough

Posted: Wed Oct 08, 2008 5:30 pm
by IceSoft
EdzUp[SD] wrote:surely just copy and paste then small adjustment is simple enough
Of course...You are right. That's not what I mean.

The different is: I can declare like this:

Code: Select all

 Declare BlaBla.l(a.l, b.b, c.c)
and use:

Code: Select all

Procedure.l BlaBla(ThisIsMYfirst.l, aShorterOne.b, s.c)
If there is no check...why I should write it?
Ok right... I write it because my varaibles are selfdescriping...
For that I can also use comments ;-)

And be a realist: Do you really use such long names for variables?

Posted: Wed Oct 08, 2008 7:39 pm
by Kaeru Gaman
another (and in my opinion more important) point just occurring to me now as I see the Declaration above:
Declare ScanDir.l(Dir.s, C.l, a.b, r.w)
Procedure.l ScanDir(Dir.s, C.l, a.b, r.w)
... I would like to see it being changed either to
Procedure ScanDir.l
or to
Declare.l ScanDir
to have a more consistant syntax.

the latter would produce less incompatibilities, I would say.

Posted: Wed Oct 08, 2008 11:59 pm
by traumatic
IceSoft wrote:And be a realist: Do you really use such long names for variables?
Can't talk for others but I certainly do. That's what variable names are for.

...and what about the "less typing" argument when you're OK with writing
more comments that way? ;)

Posted: Thu Oct 09, 2008 10:44 am
by Psychophanta
Very agree with IceSoft:
+1
And the same for Prototype. (so another +1 for me :) )