dalek arVM: c06c0cf | (Dagfinn Ilmari Mannsåker)++ | src/strings/ (6 files):
Fix const warnings about pointers to Unicode case table
16:06
arVM: f80c129 | lizmat++ | src/strings/ (6 files):
Merge pull request #285 from ilmari/const-case-changes

Fix const warnings about pointers to Unicode case table
TimToady note: in general, jnthn hates const sprinkling more than the warnings 16:11
lizmat TimToady: but does he hate it because it is tedious work (which would make him happy having it been done already) 16:19
or is it reading the code with const sprinkled which upsets him ?
fwiw, I prefer to see no warnings at all when compiling :-) 16:20
[Coke] the consts tend to cause more trouble than they fix, as I recall. 16:23
ilmari would rather have a compile time error when trying to assign through a pointer to const than a runtime segfault when it tries to write to a read-only mapping 16:24
[Coke] and they're infectious - once you start adding them, you can't stop. :|
ilmari ilmari@garkbit:~/src/moarvm$ ag -w const src/|wc -l 16:25
1205
I'm sure six more don't hurt 16:26
sorry, seven
I'm no proponent of consting things just because you can 16:28
but
a) big tables actually benefit from being const, since they can be mapped read-only and shared between processs
b) "harmless" warnings can mask real problems 16:29
TimToady prior discussion at irclog.perlgeek.de/moarvm/2015-09-23#i_11262041 16:30
leont [Coke]: that is even more so in C++. I tend to start my project const-correct, but adding it later is a pain (and even adding as you go can be annoying) 16:31
ilmari I've seen the trouble consting sprees have caused in perl5, so I'm no fan of retroactively consting stuff like function parameters 16:32
TimToady which you just did 16:33
ilmari not for the sake of it
I meant stuff like "oh, this function doesn't write modify this argument, let's const it" 16:34
this was to fix an actual warning, and deconsting the tables to which they point would be wrong
TimToady well, I'm ambivalent, just trying to stick up for jnthn while he's away :) 16:35
"stick up for" is an odd English idiom... 16:36
I guess it's a protest sign metaphor
lizmat unless someone stops me, I will revert 16:48
JimmyZ added the const to the global static var, for some good reason.
lizmat: I think it is fine to keep it.
since it is for fixing warnings. 16:49
[Coke] jnthn can revert it when he gets back.
if he wants.
JimmyZ yeah too.
lizmat considers herself stopped 16:51
leont Wait until you add volatile-correctness to the mix, then it becomes fun ;-) 16:52