Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Overriding Display methods too complicated due to high amount of arguments (Making Display class easier to use)
Re: Overriding Display methods too complicated due to high amount of arguments [message #55474 is a reply to message #55473] |
Sat, 14 November 2020 14:33   |
 |
mirek
Messages: 14258 Registered: November 2005
|
Ultimate Member |
|
|
Klugier wrote on Sat, 14 November 2020 14:23Hello Mirek,
I see EncodeHtml declaration. It has 9 parameters, so you should be pretty sure that nobody wants to deal with that code. This is not good for the framework to be over-complicated. We pride ourselves on simplicity, but in some places we do something opposite. Where is logic here? Only to avoid small amount of lines in the library. We are here for the users not to create library with the fewer possible lines of code. If we would follow that path we will end with things like Display API and EncodeHtml. My point of view here is simple, we should think what is the best/easiest for our users.
Hey, you are banging on open doors here. I wanted to fix EncodeHTML for years, just never got to it. I just listed that to showcase that I understand the rule and that I agree, in most cases.
Quote:
Where is logic here?
This did not happen to save small amount of lines! This started as function with 3 parameters, but then grew over time without any real incentive to fix it. But you know there are some more rules:
- GET IT DONE FIRST
- HAVE A GOOD REASON TO FIX IT
Now EncodeHTML is ugly, but it is so seldom used that I never got to fixing it. That said, even after the fix we must keep the current version around, obsoleted but available. Because
- HAVE A REALLY REALLY GOOD REASON BEFORE BREAKING THE CLIENT CODE
Mirek
|
|
|
 |
|
Overriding Display methods too complicated due to high amount of arguments
By: Klugier on Sun, 18 October 2020 00:01
|
 |
|
Re: Overriding Display methods too complicated due to high amount of arguments
By: Oblivion on Sun, 18 October 2020 19:16
|
 |
|
Re: Overriding Display methods too complicated due to high amount of arguments
By: mirek on Mon, 19 October 2020 15:59
|
 |
|
Re: Overriding Display methods too complicated due to high amount of arguments
By: Oblivion on Mon, 19 October 2020 16:53
|
 |
|
Re: Overriding Display methods too complicated due to high amount of arguments
By: mirek on Sat, 14 November 2020 10:02
|
 |
|
Re: Overriding Display methods too complicated due to high amount of arguments
By: Oblivion on Sat, 14 November 2020 10:14
|
 |
|
Re: Overriding Display methods too complicated due to high amount of arguments
By: Klugier on Sat, 14 November 2020 14:23
|
 |
|
Re: Overriding Display methods too complicated due to high amount of arguments
By: mirek on Sat, 14 November 2020 14:33
|
 |
|
Re: Overriding Display methods too complicated due to high amount of arguments
By: mirek on Sat, 14 November 2020 14:38
|
 |
|
Re: Overriding Display methods too complicated due to high amount of arguments
By: Klugier on Sat, 14 November 2020 20:29
|
 |
|
Re: Overriding Display methods too complicated due to high amount of arguments
By: mirek on Sun, 15 November 2020 00:03
|
Goto Forum:
Current Time: Tue May 13 20:24:20 CEST 2025
Total time taken to generate the page: 0.00751 seconds
|