Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Klugier wrote on Sat, 14 November 2020 14:23
Hello 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
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to use multi-tab control?
Next Topic: Can I make round form
Goto Forum:
  


Current Time: Sun Apr 28 23:03:12 CEST 2024

Total time taken to generate the page: 0.07966 seconds