On Oct 11, 2017, at 10:40 AM, David Adams wrote:

> If you don't mind and are on the forums, would you mind putting in a
> feature request? And, for what it's worth, it would be super weird if they
> *hadn't* thought of this. The languages they write in have all kinds of
> compiler pre-processing instrucxtions and compiler macros.

Nobody likes when someone says “what’s wrong with you? You are a weirdo for not 
thinking of this.”  Who knows the minds of 4D Engineers? I’m just trying to be 
nice and give them the benefit of the doubt. (I know that’s not your style, but 
it’s mine.)

David, you are going to catch a lot more flies with honey than with vinegar. 
Give it a try you are going to find it really does work. 

Who do you want to talk to or listen to? A “nice guy” or an “angry man shaking 
his fist”. 

>> I would suggest something like this:
>> //%C-   to turn off compiling code
>> SET TEXT TO PASTEBOARD($stuff_t)
>> //%C+   to turn on compiling code
>> That’s how you do it with range checking using //%R- and //%R+.
> 
> Nice! I was thinking of how you turn off warnings (look at
> Compiler_Suppress_Warnings in our source if you don't know that one), but
> your way is vastly better. It's actually a really exciting feature request
> the way you have it, submit it!

Done. 

> Compiler directive to turn off compiling code

http://forums.4d.com/Post/FR/21136869/1/21136931#21136931

> 
> Sent on : Today - 11:27 AM
> I would like a compiler directive like we have for range checking that you 
> can use to turn off compiling of code so that you can mix thread safe and non 
> thread safe code in a method.
> 
> Example:
> 
> //%C- to turn off compiling code
> SET TEXT TO PASTEBOARD($stuff_t)
> //%C+ to turn on compiling code
> 
> That way when the compiler checks to see if a method is allowed to run as 
> preemptive it can skip over everything bracketed by "//%C-" and "//%C+". 
> 
> Good use is for debugging code that you only need when running interpreted. 
> But there are other good uses for a feature like this.


>> Too many developers go crazy when 4D adds some new features and get it in 
>> their head they MUST
>> rewrite everything to use the new features. That’s not perspective. I think 
>> “nice, another tool
>> in the toolbox that I can use for something new when I get the chance."
> 
> Honestly, I can't remember anyone I've met like that. Plenty of people dive
> in to check out a new feature....about 6-12 months after they're
> introduced. I doubt a lot of people are trying to use preemptive mode. Or,
> if they are, they're not saying anything here.

I sure can. Remember when C_OBJECT variables were introduced? There were 
several developers here that talked about completely overhauling all their code 
to eliminate process and interprocess variables and replace all of it with 
object variables. Code was working fine. They just wanted to use this cool new 
variable type. 

Also trying to justify reducing the size of the process variable table. 
Supposedly having 1 - 10 object variables was far superior to 100 process 
variables. Who the hell cares if your process variable table is 1MB in size 
when everyone has over 4,000MB to work with? And don’t try to say “it will save 
time starting new processes”. Really? By how much real world time? By 4ms? Can 
any human notice a decrease in time by that much? 

And if you really think about it, a C_OBJECT variable most likely takes up more 
space in memory than a C_TEXT or C_LONGINT or C_BOOLEAN. You know, with all the 
extra overhead that a C_OBJECT has to manage to provide the fast lookup and 
access to properties. 

There is no such thing as a free lunch. It may look on the surface to have 
savings, but under the hood — and we don’t know how it is implemented under the 
hood — they is most likely a price for using this new variable type. 

>> I'd love to hear from other people that are using preemptive processes
>> regarding things they found that are good, bad, surprising, exciting, and
>> me'h.
>> 
>> CALL FORM. CALL FORM. CALL FORM. That’s the most useful new command I’ve 
>> found.
> 
> Yes, it solves a lot of problems that I don't have ;-) I'm just not into
> complicated 4D GUI work by choice. 

I do a lot of UI work with 4D. I love doing UI work. Windows and dialog boxes 
that users deal with all day every day. So 4D is great for a lot of the work 
that I do. 

Isn’t it interesting that 4D became so useful and popular because it provided a 
great way to build very nice user interfaces to database solutions. I never 
realized you don’t care about UI stuff and actively avoid it. It explains a 
lot. You are a code monster and backend database monster. If 4D is not 
advancing the language and the database you think it is sitting still. Too bad 
they can’t seem to advance both with equal speed. 

And by the way, your 4D Method presentation example database had a very nice 
UI. Beautiful. So you do have talent or good taste there, in my opinion.

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
**********************************************************************

Reply via email to