<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div style="font-family:Arial;">Hi Andrew,<br></div><div style="font-family:Arial;"><br></div><div style="font-family:Arial;">I think GDAL uses a mix of styles, but if you dislike Hungarian notation, it's still important to distinguish between "systems" (e.g. dwBytes) and "apps" (e.g. cchWideChar) notation.<br></div><div style="font-family:Arial;"><br></div><div style="font-family:Arial;">The first one just repeats the variable type, which is mostly redundant, but the second actually gives you more information. Is that variable counting bytes, elements, or characters? Is it a NULL-terminated string, or a byte bufer with an associated length?<br></div><div style="font-family:Arial;"><br></div><div style="font-family:Arial;">If you look at <a href="https://learn.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-widechartomultibyte">https://learn.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-widechartomultibyte</a>, you'll see how Hungarian notation makes it easy (assuming you're used to it) to understand what cchWideChar and cbMultiByte mean, even though both are int.<br></div><div style="font-family:Arial;"><br></div><div style="font-family:Arial;">Laurentiu<br></div><div style="font-family:Arial;"><br></div><div>On Wed, Apr 17, 2024, at 16:48, Andrew Bell via gdal-dev wrote:<br></div><blockquote type="cite" id="qt" style=""><div dir="ltr"><div>Hi,<br></div><div><br></div><div><div>I was going to make some changes to some GDAL code and I generally want to follow along. I see that most of the code is still using Hungarian notation for identifier names. I haven't seen this anywhere else in like 20 years.<br></div><div><br></div><div>Is it OK to submit code without this naming convention or do we still think it's important. I didn't see an RFC or documentation that covers this, but there's lots so I may have missed it.<br></div><div><br></div><div>Thanks,<br></div><div><br></div><div><span class="qt-gmail_signature_prefix">--</span><br></div><div dir="ltr" class="qt-gmail_signature"><div>Andrew Bell<br></div><div><a href="mailto:andrew.bell.ia@gmail.com" target="_blank">andrew.bell.ia@gmail.com</a><br></div></div></div></div><div>_______________________________________________<br></div><div>gdal-dev mailing list<br></div><div><a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br></div><div><a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></div><div><br></div></blockquote><div style="font-family:Arial;"><br></div></body></html>