On Mon, Jul 31, 2017 at 1:44 PM, Julio Carneiro via 4D_Tech <
4d_tech@lists.4d.com> wrote:


> We coud write something like:
> > MyMediocreMethod(->[Table];5;Current date;{numofdays:5})
> or
> > MyMediocreMethod(->[Table];5;Current date;{startDay:0; numofdays:5})
>

Yes, wouldn't that be nice :(

Now, I’ll repeat one more time what I believe is missing from 4D’s object
> implementation: the ability to declare object structures and have compiler
> syntax check them.
>

+1,000! I was fighting for structs for months over on the Forums before I
banished myself from there. As far as I can tell, all I did was annoy 4D
and waste my own time. But, yes, we absolutely need structs. It's a
50-year+ old feature and not having declarable, verifiable structures makes
it *incredibly* hard to write a lot of sensible things in 4D. I'll stop,
but you'e got my vote.  And, agreed, this is a task for the compiler - not
the runtime interpreter.

To date, I have gotten not one person at 4D to seemingly agree that what
I'm talking about is missing, is a problem, or matters. I just don't get
it. Presumably, they don't use 4D for serious work and spend their time in
languages with all kinds of nice tools.


> Where $options would be a “MyMediocreMethodOptions” type object. And the
> compiler could even validate code to populate MyMediocreMethodOptions
> variables.
>

New(). Exactly. Some months back I tried to write my own meta-syntax in 4D
and ultimately had to give up on that too because of the incomplete JSON
support. (I had written a version in V13 using NTK's JSON.) I could have
done it in XML but, honestly, I have to write my own  declarative syntax, a
parser for it, and then a New()/Create() engine and Validate() engine? And
then to do proper validation, I have to write a complete code parser &
scanner? (I got pretty far down that road too.) That's a lot of heavy
lifting for something every other language has build in (and then some.)

What I’m trying to say here is that just replacing optional parameters by a
> C_Object does not bring any benefit, at least to me :-)
> The old David Adams code looks much better to me :-)
>

Well, I think that _everyone_ can agree that he's an idiot, you can just
pick the version you think is an idiot. There are so many to choose from ;-)
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to