Tim, š
It seems possible to me that there is another option for the āFolder separatorā character. On startup the address for this character is populated with the correct value. Thereafter it is retrieved as any other constant. Iām guessing it is determined in runtime, most likely at startup. Iām glad you think about such things. David Ringsmuth From: Tim Nevels via 4D_Tech Sent: Thursday, July 13, 2017 8:24 PM To: 4d_tech@lists.4d.com Cc: Tim Nevels Subject: Re: Folder separator constant On Jul 13, 2017, at 6:47 PM,Wayne Stewart wrote: > Mind you it took me a long time to discover the Folder separator constant!! <rant> Now here is a great feature implemented in the wrong way. It confuses a programmers logical sensibility. āFolder separatorā constant. It is a āconstantā. Constants have a single value. Right? āFolder separatorā constant has whatever value it correct depending on the platform it is running on. If on macOS it is colon ā:ā. On Windows is it back slash ā\ā. Compile your database. Run a method on macOS and you get one value for āFolder constantā and a different value on Windows. Client side, server side, it doesnāt matter. Runtime determines the value not compiling. But I thought constants were evaluated and resolved at compile time. Isnāt that the way it works in all other programming languages? A constant is a single value hard coded into the program code by the compiler. So 4D Compiler must treat this āconstantā differently from other constants. The 4D compiler must code this as a function that gets evaluated at runtime. 4D what were you thinking! Was it so terrible to make āFolder separatorā into a function like āApplication typeā? Or did some engineer have the intense need and desire to see āFolder separatorā show up in the method editor as a constant. Damn the semantics of it all! It may look like a constant, but itās not. It is secretly a function. From a programmers point of view it sure seems like an odd decision to me. </rant> This has always bugged me. I just had to finally get it off my chest. :) Tim ******************************************** Tim Nevels Innovative Solutions 785-749-3444 timnev...@mac.com ******************************************** ********************************************************************** 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 ********************************************************************** ********************************************************************** 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 **********************************************************************