Re:Switching to C over 'Modern' Programming Languages
by xigoi on Thursday April 13, 2023 @03:59PM
(#35561306)
Okay, so you write your own string library. Now you'd like to do the same thing for resizable arrays, so you write a resizable array li… oops, you can't, because C doesn't have parametric types.
[ Parent
| on HN ]
Re:Switching to C over 'Modern' Programming Languages
by flohofwoe on Friday April 14, 2023 @03:13AM
(#35566454)
Preprocessor macros are an entirely valid tool in the C language toolbox, even if demonized by C++ coders.
Re:Switching to C over 'Modern' Programming Languages
by pjmlp on Friday April 14, 2023 @04:54AM
(#35567129)
Even Macro Assemblers from the MS-DOS and Amiga days are better than C pre-processor macros.
Re:Switching to C over 'Modern' Programming Languages
by melagonster on Friday April 14, 2023 @02:06PM
(#35572679)
it is black magic, absolutely respect C developers.
Re:Switching to C over 'Modern' Programming Languages
by flohofwoe on Saturday April 15, 2023 @05:58AM
(#35579127)
But the preprocessor is just simple text replacement, nothing magic about it.