文号
821449
阅读
4476
回复
3
收藏
2
No More Win32 Shit Please
2016/06/14
IP:广东

We live in an era that so much people in this world code so well, with so many options out there for them, that they don't necessarily all work for Microsoft.

Historically Microsoft is both pioneering and succesful (and they still are, commercially). However Win32 APIs, short for What to call from C or VisualBasic to make the world better, isn't that good of a choice for those who want to Actually make some useful applications, as of 2016.

[ 修改于10年6个月前 - 2016/06/14 02:39:00 ]
novakon作者
10年6个月前IP:广东
821450
1楼

Applications are made to solve problems, just like programming languages are made to describe problems.

Over the recent months @acmilan have posted heavily on topics like Encoding, Charset, and API compatibility when dealing with anything non-ASCII.

And I did read some of those articles.

To be fair, those articles did address the problem of How to process strings in VisualSomething without fear in every possible case, but did not generally help (and will never) with the problem of How to process strings with least effort and maximum efficiency.

引用
评论
novakon作者
10年6个月前修改于 10年6个月前IP:广东
821451
2楼

In order to run anything on Windows, one will certainly need to generate some system calls, that involves Win32 API. But string operations should really be separated from API calls themselves.

In the old days where UTF-8 was not famillar, having code pages are great... Just not that great today. Today we have tons of third party solutions that can handle strings of all forms properly, so it simply makes no sense to discuss heavily around that. After all, this forum is about developing applications on Windows, not avoiding traps set by the Evil Microsoft / turn the framework over to get the job done, am I right?

引用
评论
10年6个月前修改于 10年6个月前IP:四川
821458
3楼

You are right. Maybe I am overthinking about effects on VC++ not supporting UTF-8 and broken Win32 Console NLS. The former problem might not be M$'s fault, but the English-only library's author's. Also, not so many libraries have been ported to Windows correctly, in fact, if had been, M$ would not have made the LXSS. So it does not really matter. The latter one is M$'s, but some other UIs (eg. TextBox in WinForms) or IPCs (eg. files, pipes, sockets) can replace it. As a conclusion, avoid using fxxking VC++, English-only libraries and Win32 Console ourselves, and program happier.

引用
评论
笔记
{{note.content}}
{{n.user.username}}
{{fromNow(n.toc)}} {{n.status === noteStatus.disabled ? "已屏蔽" : ""}} {{n.status === noteStatus.unknown ? "正在审核" : ""}} {{n.status === noteStatus.deleted ? '已删除' : ''}}
  • 编辑
  • 删除
  • {{n.status === 'disabled' ? "解除屏蔽" : "屏蔽" }}
我也是有底线的