Thread and Shader construction inconsistency
Threads and Shaders are similar in that they are objects created from code in plain text.
However, Threads can be created from files by specifing a file path or a File object and can be created from strings via
love.filesystem.newFileData, whereas Shaders can be created from strings directly and from files using
Should they both use the same style of constructor?
The Thread constructor is consistent with other object constructors (strings for file paths, FileData for data-containing strings), but the Shader constructor is perhaps more natural for things created from plain text.
A possible objection for changing anything could be that Threads are more likely to be in files and Shaders are more likely to be inline strings, but I'm not sure if this is true, I've seen Threads as strings and Shaders as files. And if it is true, is the difference great enough to warrant different styles of construction?
So, my light proposal would be to change
newThread to accept a string containing the thread data, instead of a file path. I think this would be cool because it makes the simple and easy thing of creating a thread from a string simple and easy to do. And then, if you want to organise things in such a way that the thread is in another file,
love.filesystem.read can be used, just like it can be used for shaders now.