Oh, I didn't know that you cannot quit "result" out of Try Catch, thank you @Pietro Di Leo
- Log in to post comments
Oh, I didn't know that you cannot quit "result" out of Try Catch, thank you @Pietro Di Leo
- The compiler does not return an error for the QUIT usage as it exits the routine correctly.
BTW, DC AI is wrong here - quit with argument within for loop is not correct.
Thank you, @Dmitrii Baranov !
Just want to assure you, the account is not hacked, yet ;)
Yes, it may be a strange question (though it is a discussion), but if we put a poll (maybe not a bad idea too), I bet the majority of developers don't use the return command at all. And I remember times when it was introduced to a language (not that long ago).
That's why AI is not using it in code generation, as it relies on the common practices in the publicly available source codes.
Essentially, I would recommend always using Return to exit a function (as in all other programming languages) and Quit to exit a loop.
Yes, makes sense, thank you.
Thank you, @Robert Barbiaux ! Love the historic review! It's great to see you find the utility for return command.
p.s. IMHO, generative AIs, while useful in some contexts, are nor artificial, because they are trained with human sourced corpus, nor intelligent, because they are not able of any real creativity and are not doing any reasoning (even if they can mimic both rather well) 😇
Agree! In fact humans can mimic the reasoning perfectly too :)
Thanks @Ali Nasser ! Very interesting about quit's debugging stack level option. Could you share some examples?
Ha-ha, @Julius Kavay ! I still have hopes with my one :) He/she/it is trying and sometimes is quite helpful indeed )
Thank you, @Sergei Shutov ! I'll give it a try!
Thank you @Robert Barbiaux ! Makes sense! I'll take a look if I can implement it vs what I'm doing.
I was thinking of introducing several IRIS web-apps serving one frontend that addresses different parts of logic as a spec file and implementation far beyond 2K of lines already. But not sure if it is a good/bad practice to have several web apps, and if it is a common approach. Of course, it brings a burden of accesses/roles/security whoops, etc.
Super helpful, @Scott Weithman ! Will explore it!
Thank you, @Scott Weithman, for sharing the real-life cases! This all makes sense!
It'd be ideal to have guidelines on how to better distribute logic among a set of classes for complex solutions.
And I agree IPM can be super-helful not only for distribution and deployment but also for distributing the shared logic over the large solution.
My particular case is rather simpler: I have a full-stack app, and the /app/api spec file is getting bigger and bigger, and the impl class is already more than 2K lines. So I'm inclining to split it but the issue is that the current design of REST-API we have in InterSystems will demand me to introduce another web app endpoint, so i will have /app/functionality1/api and /app/functionality2/api and so on.
Interesting! Any examples?
Why is there so many lines in this class ?
A lot of logic.
From code quality point of view, a class exceeding 500 lines is usually considered a candidate for refactoring.
So, 1000+ maybe is already a bit off? Is there any industry standard? Or it's difficult ot cope for a human? )
Is the code generated ?
May I not answer on this question? :)
Thank you, @Eduard Lebedyuk ! Class limits doc is very helpful
This all is very helpful for understanding how to cope with JSON in IRIS. thanks a lot @Vitaliy Serdtsev
Great point, @David Hockenbroch about JSON types, thank you!
Bravo, @Vitaliy Serdtsev !
But I cannot set true and false in advance before any interaction with JSON/%Dynamic Object/%Dynamic Array.
Or can? )
For JSON, it's essential to support true and false, as it is expected by the majority of Web and mobile UI frameworks. So IRIS can recieve a lot of JSON llike:
{"p1":true,"p2":false}And should be able easily response with;
{"p1":false,"p2":true}, and not:
{"p1":$$$NO,"p2":$$$YES}Set dObj={"idea":(true), "doubt":(false)}
Do you think this is better? ;)
Actually, my another proposal is to have true and false as part of the language, where true=1 and false 0 or similar for booleans.
Thank you, @Julius Kavay !
Sounds like a great idea of enhancement, thanks for sharing, @Julius Kavay !
Thank you, @Steve Pisani ! Thanks for sharing your experience! Yes, there can be different tools and combinations that provide results of decent quality - some friends of mine also consider Antigravity (and Gemini) or Claude Code with Cursor. I hope we'll end up with several working recipes to speed up the development of usual things x100 times.
Yes, it is OK to avoid any ObjectScript or Embedded Python.
Yes it's OK to have only R from CRUD or UD from CRUD. Or only C :) All CRUD are also welcomed!
Thank you, @Tani Frankel !
Thank you, @Sylvain Guilbaud !
BTW, why split Data and Code into two databases?
Thank you, @Stephen Canzano ! That's interesting!
Thank you, Vitaly!
I see. And in my case some sets of parameters cause an anomaly, and it is not very effective to investigate it one-by-one
Thank you, @Vitaliy Serdtsev !
If enabled auditing gives the ability to see parameters, or the ability to copy/paste into SQL query tool a ready/made sql query that has been running in the system?
BTW, the global indeed contains the history! Thank you!