Forums WoW Modding Support Archives TrinityCore Discord Archives [DiscordArchive] Did someome say sugar?

[DiscordArchive] Did someome say sugar?

[DiscordArchive] Did someome say sugar?

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
06-13-2024, 12:19 PM
#1
Archived author: M'Dic • Posted: 2024-06-13T12:19:08.631000+00:00
Original source

Did someome say sugar?
rektbyfaith
06-13-2024, 12:19 PM #1

Archived author: M'Dic • Posted: 2024-06-13T12:19:08.631000+00:00
Original source

Did someome say sugar?

rektbyfaith
Administrator
0
06-13-2024, 12:21 PM
#2
Archived author: chipzz • Posted: 2024-06-13T12:21:19.008000+00:00
Original source

Oh and btw, C++ already supports quite a bit of syntactic sugar, for example operator overloading.
rektbyfaith
06-13-2024, 12:21 PM #2

Archived author: chipzz • Posted: 2024-06-13T12:21:19.008000+00:00
Original source

Oh and btw, C++ already supports quite a bit of syntactic sugar, for example operator overloading.

rektbyfaith
Administrator
0
06-13-2024, 03:25 PM
#3
Archived author: r00ty • Posted: 2024-06-13T15:25:11.242000+00:00
Original source

I would argue that in general the reason to put them in from the start is, if you then need to process the data in any way later, you don't need to create the functions and refactor. Just add the logic. But it's one of those things that is largely subjective in nature.
rektbyfaith
06-13-2024, 03:25 PM #3

Archived author: r00ty • Posted: 2024-06-13T15:25:11.242000+00:00
Original source

I would argue that in general the reason to put them in from the start is, if you then need to process the data in any way later, you don't need to create the functions and refactor. Just add the logic. But it's one of those things that is largely subjective in nature.

rektbyfaith
Administrator
0
06-13-2024, 09:59 PM
#4
Archived author: stoneharry • Posted: 2024-06-13T21:59:46.320000+00:00
Original source

Sounds like you've never worked at a large software company.

Getters and setters provide a interface to the data. This allows for easier refactability (you don't need to refactor all usages to change how it works) and it allows one to trace the call hierarchy much easier. Say you want to log out each time a value of > 100 is set, you only need to modify the one setter. Most of the time you can't add a breakpoint to production systems.
rektbyfaith
06-13-2024, 09:59 PM #4

Archived author: stoneharry • Posted: 2024-06-13T21:59:46.320000+00:00
Original source

Sounds like you've never worked at a large software company.

Getters and setters provide a interface to the data. This allows for easier refactability (you don't need to refactor all usages to change how it works) and it allows one to trace the call hierarchy much easier. Say you want to log out each time a value of > 100 is set, you only need to modify the one setter. Most of the time you can't add a breakpoint to production systems.

rektbyfaith
Administrator
0
06-13-2024, 10:33 PM
#5
Archived author: chipzz • Posted: 2024-06-13T22:33:31.986000+00:00
Original source

ROFLMAO, actually I have
rektbyfaith
06-13-2024, 10:33 PM #5

Archived author: chipzz • Posted: 2024-06-13T22:33:31.986000+00:00
Original source

ROFLMAO, actually I have

rektbyfaith
Administrator
0
06-13-2024, 10:36 PM
#6
Archived author: chipzz • Posted: 2024-06-13T22:36:35.732000+00:00
Original source

Lemme make something clear, because apparently people do not get it
rektbyfaith
06-13-2024, 10:36 PM #6

Archived author: chipzz • Posted: 2024-06-13T22:36:35.732000+00:00
Original source

Lemme make something clear, because apparently people do not get it

rektbyfaith
Administrator
0
06-13-2024, 10:38 PM
#7
Archived author: chipzz • Posted: 2024-06-13T22:38:37.757000+00:00
Original source

I am not opposed to getters and setters themselves. They definitely can have their uses. But in this case, the value they add is nil.
rektbyfaith
06-13-2024, 10:38 PM #7

Archived author: chipzz • Posted: 2024-06-13T22:38:37.757000+00:00
Original source

I am not opposed to getters and setters themselves. They definitely can have their uses. But in this case, the value they add is nil.

rektbyfaith
Administrator
0
06-13-2024, 10:39 PM
#8
Archived author: chipzz • Posted: 2024-06-13T22:39:04.847000+00:00
Original source

And there are several problems with the proposed design that are much bigger than this
rektbyfaith
06-13-2024, 10:39 PM #8

Archived author: chipzz • Posted: 2024-06-13T22:39:04.847000+00:00
Original source

And there are several problems with the proposed design that are much bigger than this

rektbyfaith
Administrator
0
06-13-2024, 10:39 PM
#9
Archived author: chipzz • Posted: 2024-06-13T22:39:57.613000+00:00
Original source

```c++
void SetInterval(uint32 interval)
{
m_interval = interval;
}
```
rektbyfaith
06-13-2024, 10:39 PM #9

Archived author: chipzz • Posted: 2024-06-13T22:39:57.613000+00:00
Original source

```c++
void SetInterval(uint32 interval)
{
m_interval = interval;
}
```

rektbyfaith
Administrator
0
06-13-2024, 10:40 PM
#10
Archived author: chipzz • Posted: 2024-06-13T22:40:06.040000+00:00
Original source

This is problematic in multiple ways
rektbyfaith
06-13-2024, 10:40 PM #10

Archived author: chipzz • Posted: 2024-06-13T22:40:06.040000+00:00
Original source

This is problematic in multiple ways

Pages (2): 1 2 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)