It is currently April 20th, 2024, 2:38 am

code simplification

Get help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 16147
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: code simplification

Post by balala »

Active Colors wrote: July 13th, 2020, 9:09 pm there are no MeasureStyles, which would be handy here. Maybe devs will make it someday.
Unfortunately this doesn't make too much sense. Excepting a few cases, those wouldn't help, in my opinion.

Sorry, but I agree with eclectic-tech:
eclectic-tech wrote: July 14th, 2020, 1:38 am Sorry, but how is this a simplification?
This whole discussion, as far as I see it, make no sense. Rainmeter is definitely NOT a programming language, so it doesn't have included all those techniques (not sure this is the right term) which a programming language has. When anyone start working in Rainmeter has to take this into account.
So if 20 measures are needed, you have to write 20 measures, or write one, copy and paste it 20 times, then modify them one by one. Sorry, but I don't see a better approach, excepting some rare cases. But that's not the point of the Rainmeter either...
User avatar
Yincognito
Rainmeter Sage
Posts: 7128
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: code simplification

Post by Yincognito »

balala wrote: July 14th, 2020, 6:29 pmUnfortunately this doesn't make too much sense. Excepting a few cases, those wouldn't help, in my opinion.
Although measure styles would probably be a nice hypothetical addition to Rainmeter, I tend to agree with you on this one, for one simple reason: while same type meters are much more similar to one another in terms of options (consistent relative positioning helps in that regard), measures are not that much ... because after all, each measure is expected to do something different from the others. In other words one will always have to modify some options in a measure, even after applying a hypotetical measure style on it.
balala wrote: July 14th, 2020, 6:29 pmThis whole discussion, as far as I see it, make no sense. Rainmeter is definitely NOT a programming language, so it doesn't have included all those techniques (not sure this is the right term) which a programming language has. When anyone start working in Rainmeter has to take this into account. So if 20 measures are needed, you have to write 20 measures, or write one, copy and paste it 20 times, then modify them one by one. Sorry, but I don't see a better approach, excepting some rare cases. But that's not the point of the Rainmeter either...
Hmm... I don't know. While this might be true today, I believe the discussion itself does make sense in terms of (future / hypothetical) possibilities, or when it comes to ways of alleviating the redundancy. After all, the whole discussion of adding IF / THEN / ELSE or FOR / NEXT -like statements to the rudimentary .INI format didn't make any sense either in the past ... until our nice developers made it possible. Our entire history and lives are filled with ideas, discussions, theories that didn't make any sense initially ... until lo and behold, they did.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth