Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Hello friends, I made this app just to try it out and have some fun, haha, but the comments are right, something like this could have been done more sensibly with C++ or other languages, ahaha.


This is exactly how I've learned to create my first Windows programs about 30 years ago, except that I'd use a C++ compiler.

I am not sure why but I believe writing C style code with a C++ compiler was how the windows API was documented to be used. I think Microsoft just went with the idea that C++ was an improved superset of C so should be used even for C-style code.


> I think Microsoft just went with the idea that C++ was an improved superset of C so should be used even for C-style code.

And as a consequence, for a long time their official C compiler was stuck on C89, while other platforms already had full C99 support and beyond. I believe their support for newer C standards has gotten better since then, but AFAIK they still don't have full C99 support.


Unironically, I would rather use your to-do app over the default Windows 11 one.


AHhhahah thanks


It's just the way it should be.

Other language doesn't fundamentally change anything if you want to use win32 API, if anything it would make things more confusing.

People often fall prey to C++isms, and they would have made the whole thing an even more confusing mess (to people not familiar with win32 API).

This is a very cute thing to do and some familiarity with win32 APIs is a nice basic competency thing, regardless of what other people think.


C++ actually makes a lot of sense specifically for Win32 API because RAII takes care of releasing all the numerous handles at the right time in the right manner. Also, things like string operations are a pain in pure C (indeed, this app uses stuff like strcpy which is a recipe for buffer overruns etc).

WTL (https://en.wikipedia.org/wiki/Windows_Template_Library) is the oldschool way to do low-level Win32 coding in C++.


https://github.com/Efeckc17/YoutubeGO By the way, you can also review or examine this application, I would be very happy :D


This is exactly the sort of project (clean, native UI) that motivated me to learn programming, kudos!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: