Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×

Comment Re:Even worse - extensions == "chmod +x" ?!? (Score 1) 564

What's better is dong it right. Like HTML requests or Email Messages, file systems should allow arbitrary metadata fields on files. Some standardized for specific purposes, such as file type. Others available for whatever the file format, program, or user wants.

For example, MP3's ID3 tags shouldn't have to be stuck into the content. They are metadata and should be represented as such.

The BeOS file system had this right. It just didn't have enough market presence to make a difference.

Comment Re:Even worse - extensions == "chmod +x" ?!? (Score 1) 564

In principle file type(s) would be separate metadata, but in practice using a file name extension works out much better. I can take some pictures on my android device, which saves them to a FAT-formatted SD card, then FTP them it to my windows box, collect them in a .zip then attach that as an email, extract them in OS/X, and it still knows they are jpegs. That's only possible because the type is part of the name. Otherwise FAT would have lost it, FTP would have lost it, the zip program would have lost it, and the email program would have lost it again.

That simply means that these other systems share the same brokenness of not having a filetype as one of their metadata fields. Again it doesn't make confusing name and type in a single field a good thing.

And BTW if you're assigning responsibility, DOS just copied CP/M's naming convention of 8.3.

Comment Re:Even worse - extensions == "chmod +x" ?!? (Score 1) 564

With whom would values of the file type field be registered? IANA?

First of all whatever you do can't be worse than file extensions because they are a free for all, and clashes, especially of 3 letter types are common.

Secondly, it's a solved problem. MIME types have both standard types defined, plus a defined process for vendor extensions. Yes, via IANA.

Thirdly file types which have no additional requirements for registration, yet unambiguous are easy, by simply prefixing them with an already registered domain (usually reversed). e.g. com.google.whateverthefuckgooglewanttocalltheirnewfiletype.

Comment Re:Yes, I agree (Score 1) 564

Certainly they are not the same file, but the OS is not at fault here. The OS (well, technically, the Windows filesystem) properly keeps track of the full filename -- it is the Windows desktop user interface that is at fault by hiding information.

Right. It's a single stack of software sold as an OS. If the extension is used as a concealed file type by one part (desktop) then the name is effectively that, and it's a bug to allow more than one the same.

I'm not saying that Windows should actually be modified to prevent this. I'm just pointing out the illogicalities that using file extensions as file types gives.

BTW, as a rif on your suggestion, EPOC32 (that because Symbian) had an interesting angle. FIle types were given by file system extensions "recognisers" that could tell file types by arbitrary means. So they could look at file contents (generally the first sector of a file) or file name. So you could look for an HTML header say, Indeed most file types have recognisable headers within them. For example I did a Gameboy emulator, and I wrote a recogniser to go with it that recognised Gameboy games by the string "(C)Nintendo" which was always at a particular offset in the file. Which my colleague found rather amusing.

In a lesser way, *nix tells the types of executables by examining the first part of the content. e.g #!/usr/bin/python

Comment Re:C++ important on Apple too (Score 0) 407

Speaking as an assembly language programmer

You can't claim authority here. I was programming assembler as far back as 1983.

Can C++ classes and templates be misused, absolutely, but that is a programmer's error not the language's.

What you mean by "misused" here is using the C++ parts of C++. Because if you do, you will almost certainly be slower than C. For example virtual functions require an extra level of indirection over C function calls.

**IF** and when it matters code can be written in a C'ish manner, possibly with minor use of classes or templates, and the generated code will not suffer.

And when it doesn't matter then no need to stray from Obj-c. There's no reason to have 2 OO languages in a project.

Again, a straw man, and again you have been misinformed with respect to C++'s usage. Ex: "C++ is the main development language used by many of Google's open-source projects."

Shut the fuck up. I've already said more than once that the only reason people use C++ in iOS or OSX projects is when they are leveraging a library that's in C++.

Comment Re:Good operating systems Dont. (Score 1) 564

No, I just envisage what will happen when this is introduced on Windows.

And again your thinking is being limited by Windows. It's like dismissing pneumatic tyres because they don't fit on horses hooves.

But adding metadata to files that is not "in your face" is not the best suggestion I've seen for that.

Whilst we could debate the usefulness or not of file types being in your face, there was precisely nothing of that suggestion in my post. As I've already told you in the post you're replying to.

Comment Re:C++ important on Apple too (Score 1) 407

Cross-platform compatibility of C++ code is excellent these days, C++ can call low-level Apple APIs exactly as well as C, and there is no performance cost to C++ unless you choose it.

1) Good but not as good as C.
2) But it's an unnecessary third layer. Obj-C has the objects. C has the speed and compatibility. What do you need a third layer for?
3) Indeed. So virtually no one uses it in this scenario.

Only time I see it used is when it's a library that was written in C++ on another platform and is simply being used on a Mac.

Comment Re:That's the problem (Score 2) 564

No. A user should be able to trust the name of the file.

They can. The user is guaranteed that the name of the file is what the filename is. They can have 100% trust in that.

You seem to be confusing that with file types. Your name is jedidiah (or at least your alias). But that's not your file type. I assume you're human. Yet we don't call you jedidiah.human.

Comment Re:Yes, I agree (Score 1) 564

Spaces in names is a pain when you're typing at the command line......who wants to have to type quotes around their file names?

Geeks et angry over perceived limitations in GUIs. Yet they give the limitations of a CLI a pass. Here the fault is with CLIs. How braindead that a valid file character is used as a separator.

Comment Re:Yes, I agree (Score 1) 564

Because it has been demonstrated for a long time that it can be dangerous to hide stuff.
So if I set something to be "malware.jpg.exe", Microsoft will present that as "malware.exe".

That doesn't demonstrate it's dangerous to hide stuff.
It shows first of all that it's a bad idea to have file type encoded in the filename. But secondly, OSX doesn't have this danger, whilst still allowing hiding filetypes in more normal situations. i.e. If you have hidden filetypes, a filename that have a double file extension will still display in full to highlight the attempt.

Slashdot Top Deals

Beware of Programmers who carry screwdrivers. -- Leonard Brandwein

Working...